From: Benoit Gschwind Date: Fri, 22 Feb 2008 22:46:17 +0000 (+0100) Subject: Move and Resize of w_client is done by ObClient now X-Git-Tag: plugin~6 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=82e2735ffa373e1bbeac7cd786beee6192cd8542;p=dana%2Fopenbox.git Move and Resize of w_client is done by ObClient now --- diff --git a/engines/default/plugin.c b/engines/default/plugin.c index b5db95f4..ee1cea3f 100644 --- a/engines/default/plugin.c +++ b/engines/default/plugin.c @@ -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)) { diff --git a/openbox/client.c b/openbox/client.c index 10f33615..675b7790 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -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