]> Dogcows Code - chaz/openbox/commitdiff
dont shade without a titlebar.
authorDana Jansens <danakj@orodu.net>
Thu, 30 Jan 2003 03:28:07 +0000 (03:28 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 30 Jan 2003 03:28:07 +0000 (03:28 +0000)
more correct configurenotifies

src/client.cc

index 82a2d5e200b07f92e16fa68a09364c25b3c572d4..8e00198a117dfb397bdf576a7195bd92e8d77489 100644 (file)
@@ -309,6 +309,10 @@ void Client::setupDecorAndFunctions()
   if (_disabled_decorations & Decor_Close)
     _decorations &= ~Decor_Close;
 
+  // You can't shade without a titlebar
+  if (!(_decorations & Decor_Titlebar))
+    _functions &= ~Func_Shade;
+  
   changeAllowedActions();
 
   if (frame) {
@@ -1142,15 +1146,23 @@ void Client::internal_move(int x, int y)
     event.xconfigure.display = **otk::display;
     event.xconfigure.event = _window;
     event.xconfigure.window = _window;
-    event.xconfigure.x = x;
-    event.xconfigure.y = y;
+    
+    // root window coords with border in mind
+    event.xconfigure.x = x - _border_width + frame->size().left;
+    event.xconfigure.y = y - _border_width + frame->size().top;
+    
     event.xconfigure.width = _area.width();
     event.xconfigure.height = _area.height();
     event.xconfigure.border_width = _border_width;
-    event.xconfigure.above = frame->window();
+    event.xconfigure.above = frame->plate();
     event.xconfigure.override_redirect = False;
     XSendEvent(event.xconfigure.display, event.xconfigure.window, False,
                StructureNotifyMask, &event);
+#if 0//def DEBUG
+    printf("Sent synthetic ConfigureNotify %d,%d %d,%d to 0x%lx\n",
+           event.xconfigure.x, event.xconfigure.y, event.xconfigure.width,
+           event.xconfigure.height, event.xconfigure.window);
+#endif
   }
 }
 
This page took 0.025994 seconds and 4 git commands to generate.