From 8de4e4d84ecd0de9046995a07de72323b8754dbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Thu, 8 Jan 2015 00:09:11 +0100 Subject: [PATCH] determine screenArea by geom_restore in checkWSP checkWorkspacePosition() operates on geom_restore to preserve window positions on temporary (without moving/resizing the window by the user) screen layout/geometry changes. Therefore, in the multiscreen case the screenbound check must be done towards the screen the window *would* be on according to geom_restore, not the one it is right now. CCBUG: 161325 REVIEW: 121320 FIXED-IN: 5.2 --- geometry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geometry.cpp b/geometry.cpp index d7525fe184..d472d8b165 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -1101,7 +1101,7 @@ void Client::checkWorkspacePosition(QRect oldGeometry, int oldDesktop) int oldRightMax = oldScreenArea.x() + oldScreenArea.width(); int oldBottomMax = oldScreenArea.y() + oldScreenArea.height(); int oldLeftMax = oldScreenArea.x(); - const QRect screenArea = workspace()->clientArea(ScreenArea, this); + const QRect screenArea = workspace()->clientArea(ScreenArea, geom_restore.center(), desktop()); int topMax = screenArea.y(); int rightMax = screenArea.x() + screenArea.width(); int bottomMax = screenArea.y() + screenArea.height();