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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user