diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-06-13 15:07:49 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-06-13 15:07:49 +0000 |
| commit | 15d615853671b0988b9a87720cac2762c702f28b (patch) | |
| tree | caaed243dfab3fe7732844f56a49689890404711 /openbox/client.c | |
| parent | 1443e17317950d5bb096a55aca81bc8fa419ffe7 (diff) | |
don't force reconfigure in a number of places, also eat enter events when reconfiguring. yay
Diffstat (limited to 'openbox/client.c')
| -rw-r--r-- | openbox/client.c | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/openbox/client.c b/openbox/client.c index 152f2316..f70ab445 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -1749,7 +1749,8 @@ void client_setup_decor_and_functions(ObClient *self, gboolean reconfig) client_change_allowed_actions(self); if (reconfig) - client_reconfigure(self); + /* force reconfigure to make sure decorations are updated */ + client_reconfigure(self, TRUE); } static void client_change_allowed_actions(ObClient *self) @@ -1807,11 +1808,25 @@ static void client_change_allowed_actions(ObClient *self) } } -void client_reconfigure(ObClient *self) +void client_reconfigure(ObClient *self, gboolean force) { - client_configure(self, self->area.x, self->area.y, - self->area.width, self->area.height, - FALSE, TRUE); + gint x, y, w, h, lw, lh; + + /* make sure the client's sizes are within its bounds, but only + reconfigure the window if it needs to. emacs will update its + normal hints every time it receives a conigurenotify */ + RECT_TO_DIMS(self->area, x, y, w, h); + if (!force) + client_try_configure(self, &x, &y, &w, &h, &lw, &lh, FALSE); + if (force || !RECT_EQUAL_DIMS(self->area, x, y, w, h)) { + gulong ignore_start; + + ob_debug("Reconfiguring client x %d y %d w %d h %d\n", + x, y, w, h); + ignore_start = event_start_ignore_all_enters(); + client_configure(self, x, y, w, h, FALSE, TRUE); + event_end_ignore_all_enters(ignore_start); + } } void client_update_wmhints(ObClient *self) @@ -3254,11 +3269,12 @@ void client_set_desktop_recursive(ObClient *self, /* raise if it was not already on the desktop */ if (old != DESKTOP_ALL) stacking_raise(CLIENT_AS_WINDOW(self)); - /* the new desktop's geometry may be different, so we may need to - resize, for example if we are maximized */ - client_reconfigure(self); if (STRUT_EXISTS(self->strut)) screen_update_areas(); + else + /* the new desktop's geometry may be different, so we may need to + resize, for example if we are maximized */ + client_reconfigure(self, FALSE); } /* move all transients */ |
