MainScreen: remove mask region asap so you can click on apps sooner when closing a panel

This commit is contained in:
ItsLemmy
2025-11-07 22:46:29 -05:00
parent 15ff939ecd
commit 5226b01fc1
3 changed files with 5 additions and 25 deletions

View File

@@ -79,6 +79,8 @@ PanelWindow {
// Desktop dimming when panels are open
property bool dimDesktop: Settings.data.general.dimDesktop
property bool isPanelOpen: (PanelService.openedPanel !== null) && (PanelService.openedPanel.screen === screen)
property bool isPanelClosing: (PanelService.openedPanel !== null) && PanelService.openedPanel.isClosing
color: {
if (dimDesktop && isPanelOpen) {
return Qt.alpha(Color.mShadow, 0.8)
@@ -124,30 +126,8 @@ PanelWindow {
id: backgroundMaskRegion
x: 0
y: 0
width: root.isPanelOpen ? root.width : 0
height: root.isPanelOpen ? root.height : 0
intersection: Intersection.Subtract
}
}
// Variants for panel regions
Variants {
id: panelRegions
// Model is the list of open panels (filters out closed ones)
model: [audioPanel, controlCenterPanel, calendarPanel].filter(function (p) {
return p && p.isPanelOpen
})
Region {
required property var modelData
property var panelBg: modelData.panelRegion
// Direct bindings
x: panelBg?.x ?? 0
y: panelBg?.y ?? 0
width: panelBg?.width ?? 0
height: panelBg?.height ?? 0
width: root.isPanelOpen && !isPanelClosing ? root.width : 0
height: root.isPanelOpen && !isPanelClosing ? root.height : 0
intersection: Intersection.Subtract
}
}

View File

@@ -101,7 +101,7 @@ ShellRoot {
IPCService {}
// MainScreen for each screen (manages bar + all panels)
MainScreens {}
AllScreens {}
}
}