ensure that moving between screens does not involve unrelated struts

icc-effect-5.14.5
Luboš Luňák 2011-10-04 11:40:16 +02:00
parent 0efbcdb1fa
commit 1876e8fd01
1 changed files with 6 additions and 0 deletions

View File

@ -1752,6 +1752,12 @@ void Workspace::sendClientToScreen(Client* c, int screen)
QPoint(( geom.center().x() - old_sarea.center().x()) * sarea.width() / old_sarea.width() + sarea.center().x(),
( geom.center().y() - old_sarea.center().y()) * sarea.height() / old_sarea.height() + sarea.center().y()));
c->setGeometry( geom );
// If the window was inside the old screen area, explicitly make sure its inside also the new screen area.
// Calling checkWorkspacePosition() should ensure that, but when moving to a small screen the window could
// be big enough to overlap outside of the new screen area, making struts from other screens come into effect,
// which could alter the resulting geometry.
if( old_sarea.contains( oldgeom ))
c->keepInArea( sarea );
c->checkWorkspacePosition( oldgeom );
ClientList transients_stacking_order = ensureStackingOrder(c->transients());
for (ClientList::ConstIterator it = transients_stacking_order.constBegin();