fix(ewmh): workspace off-by-one (#116)

This commit is contained in:
Ilari Suhonen 2023-08-24 00:43:03 +03:00 committed by GitHub
parent af4641847b
commit 855ef848fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,7 +136,7 @@ void EWMH::updateWindow(xcb_window_t win) {
if (!PWINDOW || win < 1) if (!PWINDOW || win < 1)
return; return;
const auto WORKSPACE = PWINDOW->getWorkspaceID(); const auto WORKSPACE = PWINDOW->getWorkspaceID() - 1; // because xorgs counts from 0, part 2
xcb_change_property(g_pWindowManager->DisplayConnection, XCB_PROP_MODE_REPLACE, win, HYPRATOMS["_NET_WM_DESKTOP"], XCB_ATOM_CARDINAL, 32, 1, &WORKSPACE); xcb_change_property(g_pWindowManager->DisplayConnection, XCB_PROP_MODE_REPLACE, win, HYPRATOMS["_NET_WM_DESKTOP"], XCB_ATOM_CARDINAL, 32, 1, &WORKSPACE);
// ICCCM State Normal // ICCCM State Normal