]> Dogcows Code - chaz/openbox/commitdiff
less configurenotify spam
authorDana Jansens <danakj@orodu.net>
Fri, 1 Jun 2007 04:54:42 +0000 (04:54 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 1 Jun 2007 04:54:42 +0000 (04:54 +0000)
openbox/client.c
openbox/frame.c

index d3db024bb7170235566cc32651b5836269b4a581..0de93f1f45278147d11fa6ca0d9bb269be1f3962 100644 (file)
@@ -2867,7 +2867,9 @@ void client_configure(ObClient *self, gint x, gint y, gint w, gint h,
 
     /* if the client is enlarging, then resize the client before the frame */
     if (send_resize_client && (w > oldw || h > oldh)) {
-        XResizeWindow(ob_display, self->window, MAX(w, oldw), MAX(h, oldh));
+        XMoveResizeWindow(ob_display, self->window,
+                          self->frame->size.left, self->frame->size.top,
+                          MAX(w, oldw), MAX(h, oldh));
         frame_adjust_client_area(self->frame);
     }
 
@@ -2925,7 +2927,15 @@ void client_configure(ObClient *self, gint x, gint y, gint w, gint h,
      */
     if (send_resize_client && (w <= oldw || h <= oldh)) {
         frame_adjust_client_area(self->frame);
-        XResizeWindow(ob_display, self->window, w, h);
+        XMoveResizeWindow(ob_display, self->window,
+                          self->frame->size.left, self->frame->size.top, w, h);
+    }
+
+    if (!resized) {
+        /* when the client has StaticGravity, it likes to move around.
+           also this correctly positions the client when it maps */
+        XMoveWindow(ob_display, self->window,
+                    self->frame->size.left, self->frame->size.top);
     }
 
     XFlush(ob_display);
index 0192943f75b55ed6c1169c78dde48bab0da03a78..a8391e48319ddde9c8d6cf0c35bb25c670b3cb61 100644 (file)
@@ -764,10 +764,6 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
                               self->area.width,
                               self->area.height);
 
-        /* when the client has StaticGravity, it likes to move around. */
-        XMoveWindow(ob_display, self->client->window,
-                    self->size.left, self->size.top);
-
         if (resized) {
             framerender_frame(self);
             frame_adjust_shape(self);
This page took 0.026698 seconds and 4 git commands to generate.