fix splitbutton menu popout region for clicking outside panel bounds
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 9s
Python / lint-format (pull_request) Successful in 17s
Python / test (pull_request) Successful in 28s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m8s

This commit is contained in:
2026-06-08 23:35:47 +02:00
parent 8ec7faaafd
commit 6bab341190
2 changed files with 23 additions and 1 deletions
+15
View File
@@ -46,6 +46,21 @@ MouseArea {
}
onClicked: expanded = false
onExpandedChanged: {
const win = QsWindow.window;
const contentWin = win as Windows;
if (expanded) {
contentWin.menuRegion.x = menu.x;
contentWin.menuRegion.y = menu.y;
contentWin.menuRegion.width = menu.width;
contentWin.menuRegion.height = menu.height;
} else {
contentWin.menuRegion.x = 0;
contentWin.menuRegion.y = 0;
contentWin.menuRegion.width = 0;
contentWin.menuRegion.height = 0;
}
}
TransformWatcher {
id: watcher
+8 -1
View File
@@ -20,6 +20,7 @@ CustomWindow {
readonly property alias bar: bar
readonly property bool hasFullscreen: Hypr.monitorFor(screen)?.activeWorkspace?.toplevels.values.some(t => t.lastIpcObject.fullscreen === 2)
readonly property alias interactionWrapper: interactions
readonly property alias menuRegion: menuPopoutRegion
property var root: Quickshell.shellDir
WlrLayershell.exclusionMode: ExclusionMode.Ignore
@@ -46,12 +47,18 @@ CustomWindow {
visibilities.resources = false;
}
Region {
id: menuPopoutRegion
intersection: Intersection.Subtract
}
Region {
id: region
height: root.height - bar.implicitHeight - Config.barConfig.border
intersection: Intersection.Xor
regions: popoutRegions.instances
regions: [...popoutRegions.instances, menuPopoutRegion]
width: root.width - Config.barConfig.border * 2
x: Config.barConfig.border
y: bar.implicitHeight