diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/background/Background.qml | 3 | ||||
| -rw-r--r-- | modules/drawers/Drawers.qml | 39 |
2 files changed, 22 insertions, 20 deletions
diff --git a/modules/background/Background.qml b/modules/background/Background.qml index 3cd84aa..bdba570 100644 --- a/modules/background/Background.qml +++ b/modules/background/Background.qml @@ -60,9 +60,6 @@ Loader { } } - mask: Region {} - - Loader { anchors.right: parent.right anchors.bottom: parent.bottom diff --git a/modules/drawers/Drawers.qml b/modules/drawers/Drawers.qml index 4c795a5..4ade8c4 100644 --- a/modules/drawers/Drawers.qml +++ b/modules/drawers/Drawers.qml @@ -28,6 +28,20 @@ Variants { id: win readonly property bool hasFullscreen: Hypr.monitorFor(screen)?.activeWorkspace?.toplevels.values.some(t => t.lastIpcObject.fullscreen === 2) ?? false + readonly property int dragMaskPadding: { + if (focusGrab.active || panels.popouts.isDetached) + return 0; + + const mon = Hypr.monitorFor(screen); + if (mon?.lastIpcObject.specialWorkspace.name || mon?.activeWorkspace?.lastIpcObject.windows > 0) + return 0; + + const thresholds = []; + for (const panel of ["dashboard", "launcher", "session", "sidebar"]) + if (Config[panel].enabled) + thresholds.push(Config[panel].dragThreshold); + return Math.max(...thresholds); + } onHasFullscreenChanged: { visibilities.launcher = false; @@ -40,11 +54,14 @@ Variants { WlrLayershell.exclusionMode: ExclusionMode.Ignore WlrLayershell.keyboardFocus: visibilities.launcher || visibilities.session ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None - mask: { - if (focusGrab.active || panels.popouts.isDetached) - return inputMask; - const mon = Hypr.monitorFor(screen); - return mon?.lastIpcObject.specialWorkspace.name || mon?.activeWorkspace?.lastIpcObject.windows > 0 ? inputMask : null; + mask: Region { + x: bar.implicitWidth + win.dragMaskPadding + y: Config.border.thickness + win.dragMaskPadding + width: win.width - bar.implicitWidth - Config.border.thickness - win.dragMaskPadding * 2 + height: win.height - Config.border.thickness * 2 - win.dragMaskPadding * 2 + intersection: Intersection.Xor + + regions: regions.instances } anchors.top: true @@ -52,18 +69,6 @@ Variants { anchors.left: true anchors.right: true - Region { - id: inputMask - - x: bar.implicitWidth - y: Config.border.thickness - width: win.width - bar.implicitWidth - Config.border.thickness - height: win.height - Config.border.thickness * 2 - intersection: Intersection.Xor - - regions: regions.instances - } - Variants { id: regions |