mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-22 13:35:57 +01:00
EWMH workspace coords
This commit is contained in:
parent
56c3cff855
commit
296096596b
1 changed files with 11 additions and 0 deletions
|
@ -111,6 +111,17 @@ void EWMH::updateDesktops() {
|
||||||
}
|
}
|
||||||
|
|
||||||
xcb_change_property(g_pWindowManager->DisplayConnection, XCB_PROP_MODE_REPLACE, g_pWindowManager->Screen->root, HYPRATOMS["_NET_DESKTOP_NAMES"], HYPRATOMS["UTF8_STRING"], 8, msglen, names);
|
xcb_change_property(g_pWindowManager->DisplayConnection, XCB_PROP_MODE_REPLACE, g_pWindowManager->Screen->root, HYPRATOMS["_NET_DESKTOP_NAMES"], HYPRATOMS["UTF8_STRING"], 8, msglen, names);
|
||||||
|
|
||||||
|
// Also update where the workspaces are so that bars and shit can read which monitor they belong to.
|
||||||
|
uint32_t workspaceCoords[ALLDESKTOPS * 2];
|
||||||
|
|
||||||
|
int pos = 0;
|
||||||
|
for (int i = 0; i < ALLDESKTOPS; ++i) {
|
||||||
|
workspaceCoords[pos++] = g_pWindowManager->monitors[g_pWindowManager->workspaces[i].getMonitor()].vecPosition.x;
|
||||||
|
workspaceCoords[pos++] = g_pWindowManager->monitors[g_pWindowManager->workspaces[i].getMonitor()].vecPosition.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
xcb_change_property(g_pWindowManager->DisplayConnection, XCB_PROP_MODE_REPLACE, g_pWindowManager->Screen->root, HYPRATOMS["_NET_DESKTOP_VIEWPORT"], XCB_ATOM_CARDINAL, 32, pos, &workspaceCoords);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue