Update availableScreenRect when a panel moves to another screen

Authored by akandaurov on May 25 2020, 1:34 PM.



When disconnecting the primary screen on a dual monitor setup and reconnecting it back, the available size of the secondary screen desktop may be reduced to the thickness of the primary screen panel, as can be seen by dragging a rubber band or trying to move some widgets. This apparently happens because the QML bindings had last been updated at the short moment when both panels were temporarily placed on the same screen. Update availableScreenRect therefore when a panel changes its screen.

Diff Detail

R120 Plasma Workspace
Lint Skipped
Unit Tests Skipped
akandaurov created this revision.May 25 2020, 1:34 PM
Restricted Application added a subscriber: plasma-devel. ยท View Herald TranscriptMay 25 2020, 1:34 PM
akandaurov requested review of this revision.May 25 2020, 1:34 PM

Could that also mitigate task manager showing windows of the wrong screen in certain scenarios?

The cases where I can reproduce that bug don't seem to be affected by the patch. The first case is connecting the same monitor with both VGA and DVI cables and swapping the outputs relative position along with swapping the primary output at the same time, and the second one involves placing the task manager widget on the desktop and disconnecting and reconnecting the primary monitor. I also experience completely disappearing taskbar buttons in certain cases, this also doesn't seem to be affected. As a side note, all those glitches get reverted when I enter panel customization or taskbar settings, and what looks like the cause is QQmlEngine::retranslate() getting called which updates all the QML bindings as a side effect.

davidedmundson accepted this revision.May 27 2020, 1:40 PM
This revision is now accepted and ready to land.May 27 2020, 1:40 PM
ngraham closed this revision.May 29 2020, 4:30 PM