fix the mozilla crash from the default premax being 0
authorDana Jansens <danakj@orodu.net>
Wed, 20 Nov 2002 04:42:25 +0000 (04:42 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 20 Nov 2002 04:42:25 +0000 (04:42 +0000)
CHANGELOG
src/Window.cc

index d26bd296c11c4b6c5c71bdac4ffe33ce68fd483d..9c393f46320240130f0425e3371fdf23fa93dea3 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,10 @@
 Changelog for Openbox:
 
 2.2.1:
+ * Change the default premax values to be larger than 0 (Ben Jansens)
+   for clients that map in a maximized state. (avoid a
+   mozilla crash.)
+
  * Fix for clients changing from a non-resizable window (Ben Jansens)
    to a resizable window.
 
index 25f731e92ca10e8f76b3f1272b11baa8840c79c3..0c2d2185589db9d05ea9d08a964aa46c4e931de7 100644 (file)
@@ -123,8 +123,13 @@ BlackboxWindow::BlackboxWindow(Blackbox *b, Window w, BScreen *s) {
 
   blackbox_attrib.flags = blackbox_attrib.attrib = blackbox_attrib.stack = 0l;
   blackbox_attrib.decoration = DecorNormal;
-  blackbox_attrib.premax_x = blackbox_attrib.premax_y = 0;
-  blackbox_attrib.premax_w = blackbox_attrib.premax_h = 0;
+  // default premax taking up the middle 1/4 of the screen sounds fair to me
+  blackbox_attrib.premax_x = screen->getRect().x() +
+    screen->getRect().width() / 4;
+  blackbox_attrib.premax_y = screen->getRect().y() +
+    screen->getRect().height() / 4;
+  blackbox_attrib.premax_w = screen->getRect().width() / 2;
+  blackbox_attrib.premax_h = screen->getRect().height() / 2;
 
   frame.border_w = 1;
   frame.window = frame.plate = frame.title = frame.handle = None;