From 8212b97c7991c7034137751cfddfc92b7aa35243 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 20 Nov 2002 04:42:25 +0000 Subject: [PATCH] fix the mozilla crash from the default premax being 0 --- CHANGELOG | 4 ++++ src/Window.cc | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d26bd296..9c393f46 100644 --- 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. diff --git a/src/Window.cc b/src/Window.cc index 25f731e9..0c2d2185 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -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; -- 2.34.1