mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-26 06:45:58 +01:00
EWMH desktop counting fix
This commit is contained in:
parent
0138a072ca
commit
56c3cff855
1 changed files with 2 additions and 2 deletions
|
@ -75,11 +75,11 @@ void EWMH::updateDesktops() {
|
||||||
if (!g_pWindowManager->getMonitorFromCursor()) {
|
if (!g_pWindowManager->getMonitorFromCursor()) {
|
||||||
Debug::log(ERR, "Monitor was null! (updateDesktops EWMH) Using LastWindow");
|
Debug::log(ERR, "Monitor was null! (updateDesktops EWMH) Using LastWindow");
|
||||||
if (const auto PWINDOW = g_pWindowManager->getWindowFromDrawable(g_pWindowManager->LastWindow); PWINDOW)
|
if (const auto PWINDOW = g_pWindowManager->getWindowFromDrawable(g_pWindowManager->LastWindow); PWINDOW)
|
||||||
ACTIVEWORKSPACE = g_pWindowManager->activeWorkspaces[PWINDOW->getWorkspaceID()];
|
ACTIVEWORKSPACE = g_pWindowManager->activeWorkspaces[PWINDOW->getWorkspaceID()] - 1; // because xorg counts from zero
|
||||||
else
|
else
|
||||||
ACTIVEWORKSPACE = 0;
|
ACTIVEWORKSPACE = 0;
|
||||||
} else {
|
} else {
|
||||||
ACTIVEWORKSPACE = g_pWindowManager->activeWorkspaces[g_pWindowManager->getMonitorFromCursor()->ID];
|
ACTIVEWORKSPACE = g_pWindowManager->activeWorkspaces[g_pWindowManager->getMonitorFromCursor()->ID] - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DesktopInfo::lastid != ACTIVEWORKSPACE) {
|
if (DesktopInfo::lastid != ACTIVEWORKSPACE) {
|
||||||
|
|
Loading…
Reference in a new issue