1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-01 19:18:28 -04:00

desktop plugins: ensure transparent frame is shown when desktop widgets

disabled

related #2955
This commit is contained in:
bbedward
2026-07-30 15:35:44 -04:00
parent 01832856d4
commit 43d331d6cf
@@ -29,6 +29,28 @@ Item {
readonly property bool clickThrough: instanceData?.config?.clickThrough ?? false readonly property bool clickThrough: instanceData?.config?.clickThrough ?? false
readonly property bool syncPositionAcrossScreens: instanceData?.config?.syncPositionAcrossScreens ?? false readonly property bool syncPositionAcrossScreens: instanceData?.config?.syncPositionAcrossScreens ?? false
// Unmapping with the widget still in the last buffer leaves a stale image in
// Hyprland's blur cache behind transparent tiled windows (#2955), so hide the
// content, present a transparent frame, then unmap.
readonly property bool contentShowing: widgetEnabled && activeComponent !== null && (!showOnOverviewOnly || overviewActive)
property bool surfaceLingering: false
onContentShowingChanged: {
if (contentShowing) {
lingerTimer.stop();
surfaceLingering = false;
return;
}
surfaceLingering = true;
lingerTimer.restart();
}
Timer {
id: lingerTimer
interval: 64
onTriggered: root.surfaceLingering = false
}
Connections { Connections {
target: PluginService target: PluginService
enabled: !root.isBuiltin enabled: !root.isBuiltin
@@ -273,13 +295,7 @@ Item {
PanelWindow { PanelWindow {
id: widgetWindow id: widgetWindow
screen: root.screen screen: root.screen
visible: { visible: root.contentShowing || root.surfaceLingering
if (!root.widgetEnabled || root.activeComponent === null)
return false;
if (root.showOnOverviewOnly)
return root.overviewActive;
return true;
}
color: "transparent" color: "transparent"
Region { Region {
@@ -358,6 +374,7 @@ Item {
id: contentLoader id: contentLoader
anchors.fill: parent anchors.fill: parent
active: root.widgetEnabled && root.activeComponent !== null active: root.widgetEnabled && root.activeComponent !== null
visible: root.contentShowing
sourceComponent: root.activeComponent sourceComponent: root.activeComponent
opacity: 0 opacity: 0