]> Dogcows Code - chaz/openbox/commitdiff
place large windows correctly instead of asserting
authorDana Jansens <danakj@orodu.net>
Mon, 22 Jul 2002 23:32:30 +0000 (23:32 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 22 Jul 2002 23:32:30 +0000 (23:32 +0000)
src/Workspace.cc

index d9644252bffd17e0ddb56d8a6db882fe65d61226..366e8192e616e3f96dbfa093a8f489fb6e54e5a6 100644 (file)
@@ -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());
 }
This page took 0.022637 seconds and 4 git commands to generate.