mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-07 16:35:59 +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
|
@ -175,6 +175,8 @@ void KeybindManager::toggleActiveWindowFloating(std::string unusedArg) {
|
|||
PNEWWINDOW->setDefaultSize(RESTOREACSIZE);
|
||||
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() {
|
||||
std::vector<xcb_window_t> windowsList;
|
||||
std::vector<xcb_window_t> tiledWindowsList;
|
||||
std::vector<xcb_window_t> floatedWindowsList;
|
||||
|
||||
for (auto& w : g_pWindowManager->windows)
|
||||
if (w.getDrawable() > 0)
|
||||
windowsList.push_back(w.getDrawable());
|
||||
if (w.getDrawable() > 0 && !w.getIsFloating())
|
||||
tiledWindowsList.push_back(w.getDrawable());
|
||||
else if (w.getDrawable() > 0)
|
||||
floatedWindowsList.push_back(w.getDrawable());
|
||||
for (auto& w : g_pWindowManager->unmappedWindows)
|
||||
windowsList.push_back(w.getDrawable());
|
||||
floatedWindowsList.push_back(w.getDrawable());
|
||||
|
||||
// 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,
|
||||
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() {
|
||||
|
|
Loading…
Reference in a new issue