fix for windows changing from non-resizable to resizable
authorDana Jansens <danakj@orodu.net>
Wed, 13 Nov 2002 21:21:48 +0000 (21:21 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 13 Nov 2002 21:21:48 +0000 (21:21 +0000)
CHANGELOG
src/Window.cc

index 85e43cf246028e63800a7b23307ff2e60e39b195..d26bd296c11c4b6c5c71bdac4ffe33ce68fd483d 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,9 @@
 Changelog for Openbox:
 
 2.2.1:
+ * Fix for clients changing from a non-resizable window (Ben Jansens)
+   to a resizable window.
+
  * Fix bug with mutltibyte fonts being really tiny.     (Ben Jansens)
 
  * Stop using Utf8 drawing routines for Xft. These      (Ben Jansens)
index 83adf766a3c1f79ac85d4b18573258435e90aa30..25f731e92ca10e8f76b3f1272b11baa8840c79c3 100644 (file)
@@ -2957,23 +2957,22 @@ void BlackboxWindow::propertyNotifyEvent(const XPropertyEvent *pe) {
   case XA_WM_NORMAL_HINTS: {
     getWMNormalHints();
 
-    if ((client.normal_hint_flags & PMinSize) &&
-        (client.normal_hint_flags & PMaxSize)) {
-      // the window now can/can't resize itself, so the buttons need to be
-      // regrabbed.
-      ungrabButtons();
-      if (client.max_width <= client.min_width &&
-          client.max_height <= client.min_height) {
-        functions &= ~(Func_Resize | Func_Maximize);
-      } else {
-        if (! isTransient())
-          functions |= Func_Maximize;
-        functions |= Func_Resize;
-      }
-      grabButtons();
-      setAllowedActions();
-      setupDecor();
+    // the window now can/can't resize itself, so the buttons need to be
+    // regrabbed.
+    ungrabButtons();
+    if (((client.normal_hint_flags & PMinSize) &&
+         (client.normal_hint_flags & PMaxSize)) &&
+        (client.max_width <= client.min_width &&
+         client.max_height <= client.min_height)) {
+      functions &= ~(Func_Resize | Func_Maximize);
+    } else {
+      if (! isTransient())
+        functions |= Func_Maximize;
+      functions |= Func_Resize;
     }
+    grabButtons();
+    setAllowedActions();
+    setupDecor();
 
     Rect old_rect = frame.rect;