Otherwise it enters an infinite loop where the DesktopView starts to be
moved from a screen to another. That happens on XCB (only platform I've
tested) because setScreen and setGeometry will send an XCB event that is
later processed by the application again.
This should probably backported to Plasma/5.4, but considering I'm running
Qt 5.6 I would really appreciate it if someone can check if it works for
him and cherry-pick it there. An easy way to test is to change the primary
screen (in a 2-screen set up) using the kcm or xrandr.
CCMAIL: plasma-devel@kde.org
Only set the screen right before triggering show(), otherwise it can mess
up for reasons I don't know.
Also I prefer not to pass the screen in the constructor, given that we
move the DesktopView instances across screens and it gives the wrong
impression that the view is tied to the screen.
this makes the desktops and panels more deterministically
follow the primary screen
* adaptToScreen is useless per se in moveEvent, but what's worse will cause a recursion loop
* disconnect the geometry sync from the old screen
CCBUG:335710
Set all the winId dependent stuff whenever it changes, windows are recreated
upon screen change and we need to make sure the set properties are
honored after changing screens.