mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-22 21:35:58 +01:00
support net client list stacking
This commit is contained in:
parent
627d53ed7c
commit
a67cbeac94
2 changed files with 17 additions and 7 deletions
|
@ -176,5 +176,7 @@ void KeybindManager::toggleActiveWindowFloating(std::string unusedArg) {
|
||||||
PNEWWINDOW->setCanKill(RESTORECANKILL);
|
PNEWWINDOW->setCanKill(RESTORECANKILL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// EWMH to let everyone know
|
||||||
|
EWMH::updateClientList();git
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -40,18 +40,26 @@ void EWMH::updateCurrentWindow(xcb_window_t w) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EWMH::updateClientList() {
|
void EWMH::updateClientList() {
|
||||||
std::vector<xcb_window_t> windowsList;
|
std::vector<xcb_window_t> tiledWindowsList;
|
||||||
|
std::vector<xcb_window_t> floatedWindowsList;
|
||||||
|
|
||||||
for (auto& w : g_pWindowManager->windows)
|
for (auto& w : g_pWindowManager->windows)
|
||||||
if (w.getDrawable() > 0)
|
if (w.getDrawable() > 0 && !w.getIsFloating())
|
||||||
windowsList.push_back(w.getDrawable());
|
tiledWindowsList.push_back(w.getDrawable());
|
||||||
|
else if (w.getDrawable() > 0)
|
||||||
|
floatedWindowsList.push_back(w.getDrawable());
|
||||||
for (auto& w : g_pWindowManager->unmappedWindows)
|
for (auto& w : g_pWindowManager->unmappedWindows)
|
||||||
windowsList.push_back(w.getDrawable());
|
floatedWindowsList.push_back(w.getDrawable());
|
||||||
|
|
||||||
// hack
|
// hack
|
||||||
xcb_window_t* ArrWindowList = &windowsList[0];
|
xcb_window_t* ArrTiledWindowList = &tiledWindowsList[0];
|
||||||
|
xcb_window_t* ArrFloatedWindowList = &floatedWindowsList[0];
|
||||||
|
|
||||||
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, tiledWindowsList.size(), ArrTiledWindowList);
|
||||||
|
|
||||||
|
xcb_change_property(g_pWindowManager->DisplayConnection, XCB_PROP_MODE_REPLACE, g_pWindowManager->Screen->root, HYPRATOMS["_NET_CLIENT_LIST_STACKING"], XCB_ATOM_WINDOW,
|
||||||
|
32, floatedWindowsList.size(), ArrFloatedWindowList);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EWMH::refreshAllExtents() {
|
void EWMH::refreshAllExtents() {
|
||||||
|
|
Loading…
Reference in a new issue