fix(mango): prevent double focused windows in workspace apps

This commit is contained in:
Lemmy
2026-04-01 20:54:43 -04:00
parent 0cc83bdbaf
commit c31917105c
+3 -1
View File
@@ -221,10 +221,12 @@ Item {
let tagId = null;
const os = outputState[outputName];
if (isFocused && os && (os.title || os.appId) && title === os.title && appId === os.appId) {
if (isFocused && os && !os.consumed && (os.title || os.appId) && title === os.title && appId === os.appId) {
// Focused window: assign to the active tag from DWL metadata
tagId = os.activeTagId;
internal.windowTagMap[windowId] = tagId;
// Consume so a second toplevel with identical title+appId cannot also claim focus
os.consumed = true;
} else if (internal.windowTagMap[windowId] !== undefined) {
// Previously seen window: use remembered tag
tagId = internal.windowTagMap[windowId];