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
This commit is contained in:
parent
bccbb8f3a5
commit
9bbbf1c51f
1 changed files with 2 additions and 3 deletions
|
@ -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<AbstractClient*>(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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue