qs: use Hyprland.visibleMask in notifs and tooltip

This commit is contained in:
outfoxxed 2025-01-26 15:12:57 -08:00
parent bfe0689d2e
commit 324d1aad9d
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
4 changed files with 22 additions and 2 deletions
modules/user/modules/quickshell/shell

View file

@ -87,6 +87,19 @@ Scope {
HyprlandWindow.opacity: root.scaleMul
HyprlandWindow.visibleMask: Region {
id: visibleMask
item: tooltipItem
}
Connections {
target: root
function onScaleMulChanged() {
visibleMask.changed();
}
}
//height: bar.height
width: Math.max(700, tooltipItem.largestAnimWidth) // max due to qtwayland glitches
height: {
@ -96,7 +109,7 @@ Scope {
}
visible: true
color: "transparent"
//color: "#20000000"
//color: "#20ff0000"
mask: Region {
item: (shownItem?.hoverable ?? false) ? tooltipItem : null

View file

@ -2,7 +2,7 @@ import QtQuick
import Quickshell
import Quickshell.Wayland
import Quickshell.Services.Greetd
import ".."
import "background"
import "lock"
ShellRoot {

View file

@ -5,6 +5,8 @@ import "../components"
Item {
id: root
readonly property Region mask: Region { item: displayContainer }
enum FlingState {
Inert,
Returning,

View file

@ -1,11 +1,13 @@
import QtQuick
import Quickshell
import Quickshell.Wayland
import Quickshell.Hyprland
PanelWindow {
WlrLayershell.namespace: "shell:notifications"
exclusionMode: ExclusionMode.Ignore
color: "transparent"
//color: "#30606000"
anchors {
left: true
@ -28,6 +30,9 @@ PanelWindow {
visible: display.stack.children.length != 0
mask: Region { item: display.stack }
HyprlandWindow.visibleMask: Region {
regions: display.stack.children.map(child => child.mask)
}
Component.onCompleted: {
NotificationManager.overlay = this;