Move and Resize of w_client is done by ObClient now
authorBenoit Gschwind <doth.gschwind@gmail.com>
Fri, 22 Feb 2008 22:46:17 +0000 (23:46 +0100)
committerBenoit Gschwind <doth.gschwind@gmail.com>
Fri, 22 Feb 2008 22:46:17 +0000 (23:46 +0100)
engines/default/plugin.c
openbox/client.c

index b5db95f4ecec9bc1adc0fda29cd5ef2c21c1505c..ee1cea3f3c65a60e0aa93327bc8c99f959ac2cc9 100644 (file)
@@ -1056,19 +1056,9 @@ void frame_update_layout(gpointer _self, Rect area, gboolean is_resize, gboolean
         XMoveResizeWindow(obp_display, self->window, self->area.x,
                 self->area.y, self->area.width, self->area.height);
 
-        /* when the client has StaticGravity, it likes to move around.
-         also this correctly positions the client when it maps.
-         this also needs to be run when the frame's decorations sizes change!
-         */
-        if (!is_resize)
-            XMoveResizeWindow(obp_display, self->client->w_client,
-                    self->size.left, self->size.top, self->client_area.width,
-                    self->client_area.height);
-
         if (is_resize) {
-            self->need_render = TRUE;
-            frame_update_skin(self);
-            frame_adjust_shape(self);
+            //frame_update_skin(self);
+            //frame_adjust_shape(self);
         }
 
         if (!STRUT_EQUAL(self->size, oldsize)) {
index 10f33615f9ed6f8e35500ca3b3ae5e0334fbba9f..675b77901e0ea080b7a2eb2b5af2c8b012528746 100644 (file)
@@ -2836,6 +2836,15 @@ static void client_apply_startup_state(ObClient *self,
     self->area = oldarea;
     frame_engine->frame_set_decorations (self->frame, self->decorations);
     frame_engine->frame_update_layout (self->frame, self->area, FALSE, FALSE);
+    /* when the client has StaticGravity, it likes to move around.
+     also this correctly positions the client when it maps.
+     this also needs to be run when the frame's decorations sizes change!
+     */
+    Strut size;
+    frame_engine->frame_get_size (self->frame, &size);
+    XMoveResizeWindow(obt_display, self->w_client,
+                size.left, size.top, self->area.width,
+                self->area.height);
     /* if this occurs while we are focus cycling, the indicator needs to
      match the changes */
     if (focus_cycle_target == self)
@@ -3160,6 +3169,7 @@ void client_configure(ObClient *self, gint x, gint y, gint w, gint h,
 
         frame_engine->frame_set_decorations (self->frame, self->decorations);
         frame_engine->frame_update_layout (self->frame, self->area, TRUE, FALSE);
+
         /* if this occurs while we are focus cycling, the indicator needs to
          match the changes */
         if (focus_cycle_target == self)
@@ -3234,7 +3244,18 @@ void client_configure(ObClient *self, gint x, gint y, gint w, gint h,
       if (focus_cycle_target == self)
           focus_cycle_draw_indicator(self);
     }
-
+    
+    if (user && final) {
+        /* when the client has StaticGravity, it likes to move around.
+         also this correctly positions the client when it maps.
+         this also needs to be run when the frame's decorations sizes change!
+         */
+        Strut size;
+        frame_engine->frame_get_size(self->frame, &size);
+        XMoveResizeWindow(obt_display, self->w_client, size.left, size.top,
+                self->area.width, self->area.height);
+    }
+    
     XFlush(obt_display);
 
     /* if it moved between monitors, then this can affect the stacking