labwc: improve popups support (right click context menu working)

This commit is contained in:
Lemmy
2026-01-25 12:16:40 -05:00
parent 7610d306d3
commit 8d11b0be0a
26 changed files with 152 additions and 231 deletions
+5 -2
View File
@@ -2,6 +2,7 @@ import QtQuick
import Quickshell
import Quickshell.Wayland
import qs.Commons
import qs.Services.Compositor
import qs.Services.UI
import qs.Widgets
@@ -31,8 +32,10 @@ PanelWindow {
visible: false
color: "transparent"
// Use Top layer (same as MainScreen) for proper event handling
WlrLayershell.layer: WlrLayer.Top
// Use Top layer for proper event handling, but on labwc use Bottom
// to avoid stealing input from popups while still catching outside clicks.
// However, when a dialog is open, always use Top so dialogs appear above apps.
WlrLayershell.layer: (CompositorService.isLabwc && !hasDialog) ? WlrLayer.Bottom : WlrLayer.Top
WlrLayershell.keyboardFocus: hasDialog ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
WlrLayershell.namespace: "noctalia-" + windowType + "-" + (screen?.name || "unknown")
WlrLayershell.exclusionMode: ExclusionMode.Ignore