mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-08 04:09:15 -04:00
fix(DankBar): Resolve tray freeze and wallpaper loss after DPMS resume (#2457)
Fixes #2354 Root cause (tray freeze): In clickThrough mode, the PanelWindow mask uses sectionRect() with mapToItem() to compute input regions. After DPMS resume, the PanelWindow is recreated with width=0, and mapToItem() returns wrong positions. The right section's implicitWidth doesn't change after creation (fixed-size tray icons), so the mask binding is never re-evaluated when the compositor sets the actual screen width. Adding barWindow.width as a binding dependency ensures the mask recalculates on resize. Root cause (wallpaper loss): Wallpaper PanelWindows are recreated by Variants during screen reconnection before the compositor finishes output initialization. The wallpaper Image renders at 0x0 dimensions, resulting in a black screen. Changes: - DankBarWindow: add barWindow.width dependency to clickThrough mask bindings - DMSShell: add surface recovery mechanism (screen reconnect + session resume) with progressive 2-pass timer (800ms + 2800ms) that recreates bar, Frame, wallpaper, and dock surfaces after the compositor is ready - WlrOutputService: re-request output state on session resume
This commit is contained in:
@@ -726,7 +726,7 @@ PanelWindow {
|
||||
item: clickThroughEnabled ? null : inputMask
|
||||
|
||||
Region {
|
||||
readonly property var r: barWindow.clickThroughEnabled ? barWindow.sectionRect(barWindow._leftSection, false, barWindow._revealProgress) : {
|
||||
readonly property var r: barWindow.clickThroughEnabled ? barWindow.sectionRect(barWindow._leftSection, false, barWindow._revealProgress + barWindow.width * 0) : {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 0,
|
||||
@@ -739,7 +739,7 @@ PanelWindow {
|
||||
}
|
||||
|
||||
Region {
|
||||
readonly property var r: barWindow.clickThroughEnabled ? barWindow.sectionRect(barWindow._centerSection, true, barWindow._revealProgress) : {
|
||||
readonly property var r: barWindow.clickThroughEnabled ? barWindow.sectionRect(barWindow._centerSection, true, barWindow._revealProgress + barWindow.width * 0) : {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 0,
|
||||
@@ -752,7 +752,7 @@ PanelWindow {
|
||||
}
|
||||
|
||||
Region {
|
||||
readonly property var r: barWindow.clickThroughEnabled ? barWindow.sectionRect(barWindow._rightSection, false, barWindow._revealProgress) : {
|
||||
readonly property var r: barWindow.clickThroughEnabled ? barWindow.sectionRect(barWindow._rightSection, false, barWindow._revealProgress + barWindow.width * 0) : {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 0,
|
||||
|
||||
Reference in New Issue
Block a user