]> Dogcows Code - chaz/openbox/commitdiff
prevent (and if need be revert) shading if titlebar decor is toggled off
authorDana Jansens <danakj@orodu.net>
Sun, 26 May 2002 20:53:48 +0000 (20:53 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 26 May 2002 20:53:48 +0000 (20:53 +0000)
src/Window.cc

index 0a8452791f9922ba28fc59b63ddb7131b5efe062..a41868809a549390bdc56bc0aa1fe56722578b51 100644 (file)
@@ -1541,9 +1541,6 @@ void BlackboxWindow::setWorkspace(unsigned int n) {
 
 
 void BlackboxWindow::shade(void) {
-  if (! (decorations & Decor_Titlebar))
-    return;
-
   if (flags.shaded) {
     XResizeWindow(blackbox->getXDisplay(), frame.window,
                   frame.inside_w, frame.inside_h);
@@ -1557,6 +1554,9 @@ void BlackboxWindow::shade(void) {
     frame.rect.setHeight(client.rect.height() + frame.margin.top +
                          frame.margin.bottom);
   } else {
+    if (! (decorations & Decor_Titlebar))
+      return;
+
     XResizeWindow(blackbox->getXDisplay(), frame.window,
                   frame.inside_w, frame.title_h);
     flags.shaded = True;
@@ -2741,6 +2741,11 @@ void BlackboxWindow::changeBlackboxHints(BlackboxHints *net) {
 
       break;
     }
+
+    // we can not be shaded if we lack a titlebar
+    if (flags.shaded && ! (decorations & Decor_Titlebar))
+      shade();
+
     if (frame.window) {
       XMapSubwindows(blackbox->getXDisplay(), frame.window);
       XMapWindow(blackbox->getXDisplay(), frame.window);
This page took 0.024694 seconds and 4 git commands to generate.