fix(dock): cycle niri overview groups (#3038)

This commit is contained in:
Huỳnh Thiện Lộc
2026-08-12 23:28:40 -04:00
committed by GitHub
parent 47311e9af7
commit f83d6c7778
2 changed files with 14 additions and 0 deletions
@@ -199,6 +199,15 @@ Item {
}
}
if (currentIndex < 0 && CompositorService.isNiri && NiriService.inOverview && NiriService.lastFocusedWindowId !== null) {
for (let i = 0; i < toplevels.length; i++) {
if (toplevels[i].niriWindowId === NiriService.lastFocusedWindowId) {
currentIndex = i;
break;
}
}
}
const nextToplevel = toplevels[(currentIndex + 1) % toplevels.length];
if (restoreSpecialWorkspaceWindow(nextToplevel))
return;
+5
View File
@@ -24,6 +24,7 @@ Singleton {
property var outputs: ({})
property var windows: []
property var displayScales: ({})
property var lastFocusedWindowId: null
property var _realOutputs: ({})
@@ -483,6 +484,8 @@ Singleton {
function handleWindowFocusChanged(data) {
const focusedWindowId = data.id;
if (focusedWindowId !== null && focusedWindowId !== undefined)
lastFocusedWindowId = focusedWindowId;
// Only clone windows whose focus flag changes; skip reassignment if nothing changed.
let focusedWindow = null;
@@ -536,6 +539,8 @@ Singleton {
updatedWs[prop] = ws[prop];
}
updatedWs.active_window_id = data.active_window_id;
if (data.active_window_id !== null && data.active_window_id !== undefined)
lastFocusedWindowId = data.active_window_id;
const updatedWorkspaces = {};
for (const id in root.workspaces) {