mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Revert "fix(OSD): keep panelwindow always loaded to avoid hotplug crash"
This reverts commit 3b5410103a.
This commit is contained in:
+14
-6
@@ -29,9 +29,7 @@ Variants {
|
||||
|
||||
required property ShellScreen modelData
|
||||
|
||||
// Keep PanelWindow always loaded to avoid creating Wayland surfaces during
|
||||
// monitor hotplug, which races with wl_output teardown and crashes.
|
||||
active: true
|
||||
active: false
|
||||
|
||||
// OSD State
|
||||
property int currentOSDType: -1 // OSD.Type enum value, -1 means none
|
||||
@@ -232,14 +230,25 @@ Variants {
|
||||
|
||||
currentOSDType = type;
|
||||
|
||||
if (!root.active) {
|
||||
root.active = true;
|
||||
}
|
||||
|
||||
if (root.item) {
|
||||
root.item.showOSD();
|
||||
} else {
|
||||
Qt.callLater(() => {
|
||||
if (root.item)
|
||||
root.item.showOSD();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function hideOSD() {
|
||||
if (root.item?.osdItem) {
|
||||
root.item.osdItem.hideImmediately();
|
||||
} else if (root.active) {
|
||||
root.active = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -515,9 +524,6 @@ Variants {
|
||||
implicitHeight: verticalMode ? (isShortMode ? lockKeyVHeight : longVHeight) : longHHeight
|
||||
color: "transparent"
|
||||
|
||||
// Click-through — OSD is display-only, no input needed
|
||||
mask: Region {}
|
||||
|
||||
WlrLayershell.namespace: "noctalia-osd-" + (screen?.name || "unknown")
|
||||
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None
|
||||
WlrLayershell.layer: Settings.data.osd?.overlayLayer ? WlrLayer.Overlay : WlrLayer.Top
|
||||
@@ -557,6 +563,7 @@ Variants {
|
||||
osdItem.visible = false;
|
||||
root.currentOSDType = -1;
|
||||
root.lastLockKeyChanged = "";
|
||||
root.active = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -846,6 +853,7 @@ Variants {
|
||||
osdItem.scale = 0.85;
|
||||
osdItem.visible = false;
|
||||
root.currentOSDType = -1;
|
||||
root.active = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user