[shell] Fix crash when moving panel between two monitors

Authored by bshah on Oct 6 2016, 5:07 PM.

Description

[shell] Fix crash when moving panel between two monitors

Summary:
When moving panel between two screens there is time when panel is on
edge of screen and screenToFollow is null, at this point if any of the
resize or position operation gets triggered, it will attempt to get
screenToFollow's size or geometry and will result in crash as for
sometime screenToFollow is null.

This is quite a timing related bug, if you manage to move panel in time
there would be no crash otherwise there are 3-4 different crashes are
possible.

To solve this we avoid setting null values for screenToFollow, this
should not happen ideally, but setting breakpoint on setScreenToFollow
shows that null value is set from QML and should be investigated.

BUG: 369228

Test Plan:
moved panel around like crazy, can't reproduce crash on
QScreen::size or QScreen::geometry, without patch it would crash 100%

Reviewers: mart, Plasma, davidedmundson

Reviewed By: Plasma, davidedmundson

Subscribers: plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D2970

Details

Committed
bshahOct 7 2016, 2:52 AM
Reviewer
Plasma
Differential Revision
D2970: [shell] Fix crash when moving panel between two monitors
Parents
R120:9c94cd136006: [shell] Fix non-interactive panelview on non-primary screen
Branches
Unknown
Tags
Unknown