less configurenotify spam
Dana Jansens danakj@orodu.net
2 files changed,
12 insertions(+),
6 deletions(-)
M
openbox/client.c
→
openbox/client.c
@@ -2867,7 +2867,9 @@ (resized && config_resize_redraw))));
/* 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 @@ in the direction that is growing
*/ 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);
M
openbox/frame.c
→
openbox/frame.c
@@ -764,10 +764,6 @@ self->area.y,
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);