mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-09 23:15:38 -05:00
fix focus window lookups
This commit is contained in:
@@ -90,11 +90,23 @@ Singleton {
|
|||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
function onFocusedWindowIdChanged() {
|
function onFocusedWindowIdChanged() {
|
||||||
root.focusedWindowId = parseInt(NiriWorkspaceService.focusedWindowId) || -1;
|
const focusedWindowId = NiriWorkspaceService.focusedWindowId;
|
||||||
updateFromNiriData();
|
if (!focusedWindowId) {
|
||||||
|
clearFocusedWindow();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const focusedWindow = NiriWorkspaceService.windows.find(w => w.id == focusedWindowId);
|
||||||
|
if (focusedWindow) {
|
||||||
|
root.focusedAppId = focusedWindow.app_id || "";
|
||||||
|
root.focusedWindowTitle = focusedWindow.title || "";
|
||||||
|
root.focusedAppName = getDisplayName(focusedWindow.app_id || "");
|
||||||
|
root.focusedWindowId = parseInt(focusedWindow.id) || -1;
|
||||||
|
} else {
|
||||||
|
clearFocusedWindow();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function onWindowsChanged() {
|
function onWindowsChanged() {
|
||||||
updateFromNiriData();
|
updateFromNiriData();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user