mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-07 16:35:59 +01:00
implement ewmh atom _NET_FRAME_EXTENTS
This commit is contained in:
parent
fe47a00169
commit
9c654f471d
3 changed files with 11 additions and 4 deletions
|
@ -420,6 +420,7 @@ void Events::eventMapWindow(xcb_generic_event_t* event) {
|
|||
|
||||
// EWMH
|
||||
EWMH::updateClientList();
|
||||
EWMH::setFrameExtents(E->window);
|
||||
}
|
||||
|
||||
void Events::eventButtonPress(xcb_generic_event_t* event) {
|
||||
|
@ -620,4 +621,4 @@ void Events::eventClientMessage(xcb_generic_event_t* event) {
|
|||
xcb_map_window(g_pWindowManager->DisplayConnection, CLIENT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,4 +52,9 @@ void EWMH::updateClientList() {
|
|||
|
||||
xcb_change_property(g_pWindowManager->DisplayConnection, XCB_PROP_MODE_REPLACE, g_pWindowManager->Screen->root, HYPRATOMS["_NET_CLIENT_LIST"], XCB_ATOM_WINDOW,
|
||||
32, windowsList.size(), ArrWindowList);
|
||||
}
|
||||
}
|
||||
|
||||
void EWMH::setFrameExtents(xcb_window_t w) {
|
||||
uint32_t extents[4] = {ConfigManager::getInt("border_size"), ConfigManager::getInt("border_size"), ConfigManager::getInt("border_size"), ConfigManager::getInt("border_size")};
|
||||
xcb_change_property(g_pWindowManager->DisplayConnection, XCB_PROP_MODE_REPLACE, w, HYPRATOMS["_NET_FRAME_EXTENTS"], XCB_ATOM_CARDINAL, 32, 4, &extents);
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ namespace EWMH {
|
|||
void setupInitEWMH();
|
||||
void updateCurrentWindow(xcb_window_t);
|
||||
void updateClientList();
|
||||
void setFrameExtents(xcb_window_t);
|
||||
|
||||
inline xcb_window_t EWMHwindow = 0;
|
||||
};
|
||||
inline xcb_window_t EWMHwindow = XCB_WINDOW_NONE;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue