mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-22 21:35:58 +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
|
||||||
EWMH::updateClientList();
|
EWMH::updateClientList();
|
||||||
|
EWMH::setFrameExtents(E->window);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::eventButtonPress(xcb_generic_event_t* event) {
|
void Events::eventButtonPress(xcb_generic_event_t* event) {
|
||||||
|
|
|
@ -53,3 +53,8 @@ void EWMH::updateClientList() {
|
||||||
xcb_change_property(g_pWindowManager->DisplayConnection, XCB_PROP_MODE_REPLACE, g_pWindowManager->Screen->root, HYPRATOMS["_NET_CLIENT_LIST"], XCB_ATOM_WINDOW,
|
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);
|
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 setupInitEWMH();
|
||||||
void updateCurrentWindow(xcb_window_t);
|
void updateCurrentWindow(xcb_window_t);
|
||||||
void updateClientList();
|
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