From 99c5f0aed63ca325952d2645abee812b65783d9f Mon Sep 17 00:00:00 2001 From: Chaojiang Luo Date: Tue, 17 Nov 2020 11:30:34 +0800 Subject: [PATCH] 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 --- abstract_client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abstract_client.cpp b/abstract_client.cpp index 11ebba8f91..5439542086 100644 --- a/abstract_client.cpp +++ b/abstract_client.cpp @@ -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;