diff --git a/containments/taskpanel/package/contents/ui/main.qml b/containments/taskpanel/package/contents/ui/main.qml index fd27207a..b4fdda81 100644 --- a/containments/taskpanel/package/contents/ui/main.qml +++ b/containments/taskpanel/package/contents/ui/main.qml @@ -46,15 +46,24 @@ ContainmentItem { readonly property int intendedWindowLocation: inLandscape ? PlasmaCore.Types.RightEdge : PlasmaCore.Types.BottomEdge onIntendedWindowLengthChanged: maximizeTimer.restart() // ensure it always takes up the full length of the screen - onIntendedWindowLocationChanged: { - root.panel.location = intendedWindowLocation; - } + onIntendedWindowLocationChanged: setPanelLocationTimer.restart() onIntendedWindowOffsetChanged: { if (root.panel) { root.panel.offset = intendedWindowOffset; } } + // HACK: the entire shell seems to crash sometimes if this is applied immediately after a display change (ex. screen rotation) + // see https://invent.kde.org/plasma/plasma-mobile/-/issues/321 + Timer { + id: setPanelLocationTimer + running: false + interval: 100 + onTriggered: { + root.panel.location = intendedWindowLocation; + } + } + // use a timer so we don't have to maximize for every single pixel // - improves performance if the shell is run in a window, and can be resized Timer {