place large windows correctly instead of asserting
This commit is contained in:
parent
1e19ccc2cb
commit
b1874480ae
1 changed files with 4 additions and 2 deletions
|
@ -781,8 +781,10 @@ void Workspace::placeWindow(BlackboxWindow *win) {
|
|||
cascadePlacement(new_win, (win->getTitleHeight() +
|
||||
screen->getBorderWidth() * 2));
|
||||
|
||||
// make sure the placement was valid
|
||||
assert(screen->availableArea().contains(new_win));
|
||||
if (new_win.right() > screen->availableArea().right())
|
||||
new_win.setX(screen->availableArea().left());
|
||||
if (new_win.bottom() > screen->availableArea().bottom())
|
||||
new_win.setY(screen->availableArea().top());
|
||||
|
||||
win->configure(new_win.x(), new_win.y(), new_win.width(), new_win.height());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue