diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-03-21 18:38:08 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-03-21 18:38:08 +0000 |
| commit | 327a0b3de75187a23bb01ce5e8e6992fd1106a81 (patch) | |
| tree | 0c82dedb2972c7cfedc234704c510d6ea71a4e45 /openbox | |
| parent | a822cbe13b18eca60b220b9b312210c02b946a3b (diff) | |
always adjust the frames size and position together, so there is no more weird resizing before moving and edge flickering when resizing from the top/left
Diffstat (limited to 'openbox')
| -rw-r--r-- | openbox/client.c | 17 | ||||
| -rw-r--r-- | openbox/engine.c | 3 | ||||
| -rw-r--r-- | openbox/engine.h | 3 |
3 files changed, 9 insertions, 14 deletions
diff --git a/openbox/client.c b/openbox/client.c index 0a8dd1c7..6728ef6f 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -815,10 +815,9 @@ void client_setup_decor_and_functions(Client *self) client_change_allowed_actions(self); if (self->frame) { - /* change the decors on the frame */ - engine_frame_adjust_size(self->frame); - /* with more/less decorations, we may need to be repositioned */ - engine_frame_adjust_position(self->frame); + /* change the decors on the frame, and with more/less decorations, + we may also need to be repositioned */ + engine_frame_adjust_area(self->frame); /* with new decor, the window's maximized size may change */ client_remaximize(self); } @@ -1386,12 +1385,9 @@ void client_configure(Client *self, Corner anchor, int x, int y, int w, int h, /* move/resize the frame to match the request */ if (self->frame) { - /* Adjust the size and then the position, as required by the EWMH */ - if (resized) - engine_frame_adjust_size(self->frame); - if (moved) { - engine_frame_adjust_position(self->frame); + engine_frame_adjust_area(self->frame); + if (moved) { if (!user || final) { XEvent event; event.type = ConfigureNotify; @@ -1625,7 +1621,8 @@ void client_shade(Client *self, gboolean shade) self->wmstate = shade ? IconicState : NormalState; self->shaded = shade; client_change_state(self); - engine_frame_adjust_size(self->frame); + /* resize the frame to just the titlebar */ + engine_frame_adjust_area(self->frame); } void client_close(Client *self) diff --git a/openbox/engine.c b/openbox/engine.c index b1873abc..23527739 100644 --- a/openbox/engine.c +++ b/openbox/engine.c @@ -42,8 +42,7 @@ static gboolean load(char *name) LOADSYM(frame_new, engine_frame_new); LOADSYM(frame_grab_client, engine_frame_grab_client); LOADSYM(frame_release_client, engine_frame_release_client); - LOADSYM(frame_adjust_size, engine_frame_adjust_size); - LOADSYM(frame_adjust_position, engine_frame_adjust_position); + LOADSYM(frame_adjust_area, engine_frame_adjust_area); LOADSYM(frame_adjust_shape, engine_frame_adjust_shape); LOADSYM(frame_adjust_state, engine_frame_adjust_state); LOADSYM(frame_adjust_focus, engine_frame_adjust_focus); diff --git a/openbox/engine.h b/openbox/engine.h index 067f02fb..a7274253 100644 --- a/openbox/engine.h +++ b/openbox/engine.h @@ -11,8 +11,7 @@ EngineFrameNew *engine_frame_new; EngineFrameGrabClient *engine_frame_grab_client; EngineFrameReleaseClient *engine_frame_release_client; -EngineFrameAdjustSize *engine_frame_adjust_size; -EngineFrameAdjustPosition *engine_frame_adjust_position; +EngineFrameAdjustArea *engine_frame_adjust_area; EngineFrameAdjustShape *engine_frame_adjust_shape; EngineFrameAdjustState *engine_frame_adjust_state; EngineFrameAdjustFocus *engine_frame_adjust_focus; |
