From 9bbbf1c51f4b4daa67c8a5c1f22c7c47ef4deb07 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 12 Sep 2019 18:21:59 +0300 Subject: [PATCH] Pass correct area to placeCascaded in cascadeDesktop Summary: We have to provide placement area for the screen on which the client is. Reviewers: #kwin, romangg Reviewed By: #kwin, romangg Subscribers: romangg, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D23921 --- placement.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/placement.cpp b/placement.cpp index 9fcf2d88b5..e5075f43e1 100644 --- a/placement.cpp +++ b/placement.cpp @@ -603,11 +603,9 @@ void Placement::placeMaximizing(AbstractClient *c, const QRect &area, Policy nex void Placement::cascadeDesktop() { -// TODO XINERAMA this probably is not right for xinerama Workspace *ws = Workspace::self(); const int desktop = VirtualDesktopManager::self()->current(); reinitCascading(desktop); - const QRect area = ws->clientArea(PlacementArea, QPoint(0, 0), desktop); foreach (Toplevel *toplevel, ws->stackingOrder()) { auto client = qobject_cast(toplevel); if (!client || @@ -616,7 +614,8 @@ void Placement::cascadeDesktop() (client->isOnAllDesktops()) || (!client->isMovable())) continue; - placeCascaded(client, area); + const QRect placementArea = workspace()->clientArea(PlacementArea, client); + placeCascaded(client, placementArea); } }