From b1874480ae98debabcfe92a6388dd139cd49e49b Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 22 Jul 2002 23:32:30 +0000 Subject: [PATCH] place large windows correctly instead of asserting --- src/Workspace.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Workspace.cc b/src/Workspace.cc index d9644252..366e8192 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc @@ -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()); } -- 2.45.2