Skip to content

Commit 06e0362

Browse files
committed
fix: plasmashell crash when monitors are disconnected
While it worked, declaring the ShaderEffectSource inside OpacityMask makes plasma crash during output disconnect/reconnect, making it a sibling fixes this. backtrace in case this is an actual bug worth looking into for someone else: https://gist.github.com/luisbocanegra/2e46bcb81179f3a7f53b2ede9891e715 refs: #458
1 parent 567d13a commit 06e0362

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

package/contents/ui/components/CustomBackground.qml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,18 @@ Rectangle {
994994
visible: false
995995
}
996996

997+
ShaderEffectSource {
998+
id: clipSourceShaderItem
999+
live: true
1000+
sourceItem: {
1001+
if (rect.backgroundClipping) {
1002+
return rect.target?.applet ?? null;
1003+
}
1004+
return null;
1005+
}
1006+
hideSource: true
1007+
}
1008+
9971009
// clip widget content to custom background shape
9981010
// TODO: figure out how to do the same with the panel
9991011
OpacityMask {
@@ -1004,15 +1016,6 @@ Rectangle {
10041016
anchors.bottomMargin: rect.horizontal ? undefined : rect.marginBottom
10051017
maskSource: mask
10061018
visible: !!source
1007-
source: ShaderEffectSource {
1008-
live: true
1009-
sourceItem: {
1010-
if (rect.backgroundClipping) {
1011-
return rect.target?.applet ?? null;
1012-
}
1013-
return null;
1014-
}
1015-
hideSource: true
1016-
}
1019+
source: clipSourceShaderItem
10171020
}
10181021
}

0 commit comments

Comments
 (0)