]> Dogcows Code - chaz/openbox/blobdiff - openbox/frame.c
only end the interactive action if it's the action you just ran
[chaz/openbox] / openbox / frame.c
index 8f947e49d49e289aea1bf48f2564b899fe0cdf43..c53d51d9a76576ff3ff1f762a623792660beff81 100644 (file)
@@ -51,6 +51,7 @@ static void layout_title(ObFrame *self);
 static void set_theme_statics(ObFrame *self);
 static void free_theme_statics(ObFrame *self);
 static gboolean frame_animate_iconify(gpointer self);
+static void frame_adjust_shape(ObFrame *self);
 static void frame_adjust_cursors(ObFrame *self);
 static void frame_get_offscreen_buffer(ObFrame *self);
 static void frame_free_offscreen_buffer(ObFrame *self);
@@ -313,9 +314,6 @@ void frame_adjust_shape(ObFrame *self)
                                 ShapeUnion, Unsorted);
     }
 #endif
-
-    /* the offscreen buffer's shape needs to match */
-    frame_get_offscreen_buffer(self);
 }
 
 void frame_adjust_area(ObFrame *self, gboolean moved,
@@ -757,9 +755,7 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
            frame_client_gravity. */
         self->area.x = self->client->area.x;
         self->area.y = self->client->area.y;
-        frame_client_gravity(self, &self->area.x, &self->area.y,
-                             self->client->area.width,
-                             self->client->area.height);
+        frame_client_gravity(self, &self->area.x, &self->area.y);
     }
 
     if (!fake) {
@@ -786,8 +782,10 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
         if (resized) {
             self->need_render = TRUE;
             framerender_frame(self);
-            /* this also updates the offscreen buffer */
             frame_adjust_shape(self);
+
+            /* the offscreen buffer's shape needs to match */
+            frame_get_offscreen_buffer(self);
         }
 
         if (!STRUT_EQUAL(self->size, oldsize)) {
@@ -1404,7 +1402,7 @@ ObFrameContext frame_context(ObClient *client, Window win, gint x, gint y)
     return OB_FRAME_CONTEXT_NONE;
 }
 
-void frame_client_gravity(ObFrame *self, gint *x, gint *y, gint w, gint h)
+void frame_client_gravity(ObFrame *self, gint *x, gint *y)
 {
     /* horizontal */
     switch (self->client->gravity) {
@@ -1467,7 +1465,7 @@ void frame_client_gravity(ObFrame *self, gint *x, gint *y, gint w, gint h)
     }
 }
 
-void frame_frame_gravity(ObFrame *self, gint *x, gint *y, gint w, gint h)
+void frame_frame_gravity(ObFrame *self, gint *x, gint *y)
 {
     /* horizontal */
     switch (self->client->gravity) {
@@ -1528,7 +1526,7 @@ void frame_rect_to_frame(ObFrame *self, Rect *r)
 {
     r->width += self->size.left + self->size.right;
     r->height += self->size.top + self->size.bottom;
-    frame_client_gravity(self, &r->x, &r->y, r->width, r->height);
+    frame_client_gravity(self, &r->x, &r->y);
 }
 
 static void flash_done(gpointer data)
@@ -1677,7 +1675,10 @@ void frame_end_iconify_animation(ObFrame *self)
         XUnmapWindow(ob_display, self->window);
     else {
         /* Send a ConfigureNotify when the animation is done, this fixes
-           KDE's pager showing the window in the wrong place. */
+           KDE's pager showing the window in the wrong place.  since the
+           window is mapped at a different location and is then moved, we
+           need to send the synthetic configurenotify, since apps may have
+           read the position when the client mapped, apparently. */
         client_reconfigure(self->client, TRUE);
 
         /* the offscreen buffer is invalid when the window is resized */
This page took 0.02271 seconds and 4 git commands to generate.