Commit 99c5f0ae authored by Chaojiang Luo's avatar Chaojiang Luo Committed by David Edmundson

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
parent 44b2a3f8
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment