From f91f50e1c19b0e698164c6838c723006b9d8f3e3 Mon Sep 17 00:00:00 2001 From: bluelhf Date: Thu, 24 Aug 2023 00:39:38 +0300 Subject: [PATCH] fix(ewmh): workspace off-by-one --- src/ewmh/ewmh.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ewmh/ewmh.cpp b/src/ewmh/ewmh.cpp index 5306d21..ca465cf 100644 --- a/src/ewmh/ewmh.cpp +++ b/src/ewmh/ewmh.cpp @@ -136,7 +136,7 @@ void EWMH::updateWindow(xcb_window_t win) { if (!PWINDOW || win < 1) 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); // ICCCM State Normal