implement ewmh atom _NET_FRAME_EXTENTS

This commit is contained in:
codic 2021-12-18 17:39:54 -08:00
parent fe47a00169
commit 9c654f471d
3 changed files with 11 additions and 4 deletions

View file

@ -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) {

View file

@ -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,
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);
}

View file

@ -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;
};