From b57b6286e200d8a56c2a885e380bdd6c1e0fa439 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Sun, 6 Sep 2026 00:22:53 +0100 Subject: [PATCH] Keep floating picker mapped and click-through while closed --- Clipboard.qml | 27 +++++++++++++-------------- manifest.json | 2 +- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/Clipboard.qml b/Clipboard.qml index 3041e54..1ac15e4 100644 --- a/Clipboard.qml +++ b/Clipboard.qml @@ -488,30 +488,29 @@ Item { // ------------------------------------------------------------ window - // Use the same proven fullscreen layer surface as Omarchy's built-in - // clipboard. The surface is transparent; only the centered card is drawn. - // An unanchored, fixed-size PanelWindow can silently fail to map after a - // plugin hot reload on current Quickshell/Hyprland versions. + // Keep the small floating layer mapped: current Quickshell can fail to + // remap an unanchored PanelWindow after visible changes from false to true. + // While closed the card is invisible, keyboard focus is disabled, and the + // empty input region makes the surface completely click-through. PanelWindow { id: panel - visible: root.opened - anchors { top: true; bottom: true; left: true; right: true } + visible: true + implicitWidth: root.cardWidth + implicitHeight: root.cardHeight color: "transparent" WlrLayershell.namespace: "alanfortlink-clipboard" WlrLayershell.layer: WlrLayer.Overlay - WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive + WlrLayershell.keyboardFocus: root.opened ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None exclusionMode: ExclusionMode.Ignore - - MouseArea { - anchors.fill: parent - onClicked: root.close() + mask: Region { + width: root.opened ? panel.width : 0 + height: root.opened ? panel.height : 0 } BorderSurface { id: card - width: root.cardWidth - height: root.cardHeight - anchors.centerIn: parent + visible: root.opened + anchors.fill: parent radius: root.cornerRadius color: root.background borderSpec: root.borderSpec diff --git a/manifest.json b/manifest.json index c3b0418..d0d61e0 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "schemaVersion": 1, "id": "alanfortlink.clipboard", "name": "Clipboard History", - "version": "1.0.1", + "version": "1.0.2", "author": "alanfortlink", "description": "Raycast-style clipboard history: fuzzy search over content, type, app and date, with rich per-type previews", "kinds": [