Revert "fix(OSD): keep panelwindow always loaded to avoid hotplug crash"

This reverts commit 3b5410103a.
This commit is contained in:
Lemmy
2026-03-21 08:41:42 -04:00
parent c6b08b380f
commit c78e7e386a
+14 -6
View File
@@ -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;
}
}