Make sure that not maximized clients are offscreen on xrandr events
Added a small check in Client::checkWorkspacePosition which will assure us that no window ("client") is left in a offscreen position. this is more a workaround than a proper fix but is the only thing we can do that will be backportable to the 4.7 branch.
This commit is contained in:
parent
68bba98e5f
commit
a2aad27a78
1 changed files with 9 additions and 0 deletions
|
@ -1154,6 +1154,15 @@ void Client::checkWorkspacePosition(const QRect &geo)
|
||||||
newGeom.x() + newGeom.width() - 1));
|
newGeom.x() + newGeom.width() - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (newGeom.x() > screenArea.right()) {
|
||||||
|
int screenWidth = screenArea.width();
|
||||||
|
newGeom.moveLeft(screenWidth - (screenWidth / 4));
|
||||||
|
}
|
||||||
|
if (newGeom.y() > screenArea.bottom()) {
|
||||||
|
int screenHeight = screenArea.height();
|
||||||
|
newGeom.moveBottom(screenHeight - (screenHeight / 4));
|
||||||
|
}
|
||||||
|
|
||||||
// Obey size hints. TODO: We really should make sure it stays in the right place
|
// Obey size hints. TODO: We really should make sure it stays in the right place
|
||||||
newGeom.setSize(adjustedSize(newGeom.size()));
|
newGeom.setSize(adjustedSize(newGeom.size()));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue