fix: Restore full screen window to the right screen

We should use the geometry restore to check the full screen workspace
to make sure the window is on the right screen.
Step:
    1.plug extend display, change to Extend mode
    2.start a window, move to extend display, change to fullscreen
    3.unplug the extend display
    4.re-plug the extend display
Now, the full screen window do not restore to the extend display
This commit is contained in:
Chaojiang Luo 2020-11-17 11:30:34 +08:00 committed by David Edmundson
parent 44b2a3f872
commit 99c5f0aed6

View file

@ -3142,7 +3142,7 @@ void AbstractClient::checkWorkspacePosition(QRect oldGeometry, int oldDesktop, Q
if (!oldClientGeometry.isValid())
oldClientGeometry = oldGeometry.adjusted(border[Left], border[Top], -border[Right], -border[Bottom]);
if (isFullScreen()) {
QRect area = workspace()->clientArea(FullScreenArea, this);
QRect area = workspace()->clientArea(FullScreenArea, geometryRestore().center(), desktop());
if (frameGeometry() != area)
setFrameGeometry(area);
return;