Keep floating picker mapped and click-through while closed

This commit is contained in:
2026-09-06 00:22:53 +01:00
parent 16da55b441
commit b57b6286e2
2 changed files with 14 additions and 15 deletions
+13 -14
View File
@@ -488,30 +488,29 @@ Item {
// ------------------------------------------------------------ window // ------------------------------------------------------------ window
// Use the same proven fullscreen layer surface as Omarchy's built-in // Keep the small floating layer mapped: current Quickshell can fail to
// clipboard. The surface is transparent; only the centered card is drawn. // remap an unanchored PanelWindow after visible changes from false to true.
// An unanchored, fixed-size PanelWindow can silently fail to map after a // While closed the card is invisible, keyboard focus is disabled, and the
// plugin hot reload on current Quickshell/Hyprland versions. // empty input region makes the surface completely click-through.
PanelWindow { PanelWindow {
id: panel id: panel
visible: root.opened visible: true
anchors { top: true; bottom: true; left: true; right: true } implicitWidth: root.cardWidth
implicitHeight: root.cardHeight
color: "transparent" color: "transparent"
WlrLayershell.namespace: "alanfortlink-clipboard" WlrLayershell.namespace: "alanfortlink-clipboard"
WlrLayershell.layer: WlrLayer.Overlay WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive WlrLayershell.keyboardFocus: root.opened ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None
exclusionMode: ExclusionMode.Ignore exclusionMode: ExclusionMode.Ignore
mask: Region {
MouseArea { width: root.opened ? panel.width : 0
anchors.fill: parent height: root.opened ? panel.height : 0
onClicked: root.close()
} }
BorderSurface { BorderSurface {
id: card id: card
width: root.cardWidth visible: root.opened
height: root.cardHeight anchors.fill: parent
anchors.centerIn: parent
radius: root.cornerRadius radius: root.cornerRadius
color: root.background color: root.background
borderSpec: root.borderSpec borderSpec: root.borderSpec
+1 -1
View File
@@ -2,7 +2,7 @@
"schemaVersion": 1, "schemaVersion": 1,
"id": "alanfortlink.clipboard", "id": "alanfortlink.clipboard",
"name": "Clipboard History", "name": "Clipboard History",
"version": "1.0.1", "version": "1.0.2",
"author": "alanfortlink", "author": "alanfortlink",
"description": "Raycast-style clipboard history: fuzzy search over content, type, app and date, with rich per-type previews", "description": "Raycast-style clipboard history: fuzzy search over content, type, app and date, with rich per-type previews",
"kinds": [ "kinds": [