]> Dogcows Code - chaz/openbox/commitdiff
reconfigure wont break decor highlighting now
authorDana Jansens <danakj@orodu.net>
Sat, 10 Aug 2002 00:03:29 +0000 (00:03 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 10 Aug 2002 00:03:29 +0000 (00:03 +0000)
src/Window.cc

index 71da3df7f1fdd93771d9eca943a1c69110482b1a..201bea66d7f28bc4c931788d92f0c3ef4a96f847 100644 (file)
@@ -237,6 +237,12 @@ BlackboxWindow::BlackboxWindow(Blackbox *b, Window w, BScreen *s) {
 
   enableDecor(True);
   
+  if (decorations & Decor_Titlebar)
+    createTitlebar();
+
+  if (decorations & Decor_Handle)
+    createHandle();
+
   // apply the size and gravity hint to the frame
 
   upsize();
@@ -440,14 +446,6 @@ void BlackboxWindow::enableDecor(bool enable) {
   } else {
     decorations = 0;
   }
-    
-  destroyTitlebar();
-  if (decorations & Decor_Titlebar)
-    createTitlebar();
-
-  destroyHandle();
-  if (decorations & Decor_Handle)
-    createHandle();
 }
 
 /*
@@ -2718,9 +2716,9 @@ void BlackboxWindow::propertyNotifyEvent(const XPropertyEvent *pe) {
 
     // adjust the window decorations based on transience
     if (isTransient()) {
-      decorations &= ~(Decor_Maximize | Decor_Handle);
       functions &= ~Func_Maximize;
       setAllowedActions();
+      enableDecor(True);
     }
 
     reconfigure();
@@ -2756,17 +2754,15 @@ void BlackboxWindow::propertyNotifyEvent(const XPropertyEvent *pe) {
       ungrabButtons();
       if (client.max_width <= client.min_width &&
           client.max_height <= client.min_height) {
-        decorations &= ~(Decor_Maximize | Decor_Handle);
         functions &= ~(Func_Resize | Func_Maximize);
       } else {
-        if (! isTransient()) {
-          decorations |= Decor_Maximize | Decor_Handle;
+        if (! isTransient())
           functions |= Func_Maximize;
-        }
         functions |= Func_Resize;
       }
       grabButtons();
       setAllowedActions();
+      enableDecor(True);
     }
 
     Rect old_rect = frame.rect;
This page took 0.026262 seconds and 4 git commands to generate.