1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-12 16:52:10 -04:00

osd: reverse media playback icons and handle screen changes

This commit is contained in:
bbedward
2026-02-13 15:43:46 -05:00
parent 242660c51d
commit 3a7430f6da
3 changed files with 64 additions and 9 deletions

View File

@@ -66,6 +66,29 @@ PanelWindow {
screen: modelData
visible: false
Connections {
target: Quickshell
function onScreensChanged() {
if (!root.visible && !root.shouldBeVisible)
return;
const currentScreenName = root.screen?.name;
if (!currentScreenName) {
root.hide();
return;
}
for (let i = 0; i < Quickshell.screens.length; i++) {
if (Quickshell.screens[i].name === currentScreenName)
return;
}
root.shouldBeVisible = false;
root.visible = false;
hideTimer.stop();
closeTimer.stop();
osdHidden();
}
}
WlrLayershell.layer: WlrLayershell.Overlay
WlrLayershell.exclusiveZone: -1
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None