diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-06-01 04:54:42 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-06-01 04:54:42 +0000 |
| commit | 9b5770277db2dec6e3864b5ba3482897ab936862 (patch) | |
| tree | 18fb95f2ea16bbf7d942a3bdb573eb41295964ea /openbox/client.c | |
| parent | fba24cf073dc217d202dfb527bc0c9f8ddcbbd2d (diff) | |
less configurenotify spam
Diffstat (limited to 'openbox/client.c')
| -rw-r--r-- | openbox/client.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/openbox/client.c b/openbox/client.c index d3db024b..0de93f1f 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -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); |
