X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=557909a1da2954fc1c26d08654abc4605e5ee077;hb=e043faec9e073c8f5599a72b4f8b87160a3fbaa0;hp=358b44556bba2566f18af4497bf91dd08e35ca05;hpb=a16f1374eed70bc30a85f35f56c05d3073c6f0e0;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index 358b4455..557909a1 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -2446,13 +2446,13 @@ gboolean client_show(ObClient *self) if (client_should_show(self)) { frame_show(self->frame); show = TRUE; - } - /* According to the ICCCM (sec 4.1.3.1) when a window is not visible, it - needs to be in IconicState. This includes when it is on another - desktop! - */ - client_change_wm_state(self); + /* According to the ICCCM (sec 4.1.3.1) when a window is not visible, + it needs to be in IconicState. This includes when it is on another + desktop! + */ + client_change_wm_state(self); + } return show; } @@ -2475,13 +2475,13 @@ gboolean client_hide(ObClient *self) frame_hide(self->frame); hide = TRUE; - } - /* According to the ICCCM (sec 4.1.3.1) when a window is not visible, it - needs to be in IconicState. This includes when it is on another - desktop! - */ - client_change_wm_state(self); + /* According to the ICCCM (sec 4.1.3.1) when a window is not visible, + it needs to be in IconicState. This includes when it is on another + desktop! + */ + client_change_wm_state(self); + } return hide; } @@ -2489,12 +2489,6 @@ void client_showhide(ObClient *self) { if (!client_show(self)) client_hide(self); - - /* According to the ICCCM (sec 4.1.3.1) when a window is not visible, it - needs to be in IconicState. This includes when it is on another - desktop! - */ - client_change_wm_state(self); } gboolean client_normal(ObClient *self) { @@ -2597,7 +2591,7 @@ void client_try_configure(ObClient *self, gint *x, gint *y, gint *w, gint *h, /* make the frame recalculate its dimentions n shit without changing anything visible for real, this way the constraints below can work with the updated frame dimensions. */ - frame_adjust_area(self->frame, TRUE, TRUE, TRUE); + frame_adjust_area(self->frame, FALSE, TRUE, TRUE); /* work within the prefered sizes given by the window */ if (!(*w == self->area.width && *h == self->area.height)) { @@ -2788,11 +2782,15 @@ void client_configure(ObClient *self, gint x, gint y, gint w, gint h, /* find the frame's dimensions and move/resize it */ fmoved = moved; fresized = resized; + + /* if decorations changed, then readjust everything for the frame */ if (self->decorations != fdecor || self->max_horz != fhorz || self->max_vert != fvert) { fmoved = fresized = TRUE; } + + /* adjust the frame */ if (fmoved || fresized) frame_adjust_area(self->frame, fmoved, fresized, FALSE); @@ -2957,10 +2955,6 @@ void client_iconify(ObClient *self, gboolean iconic, gboolean curdesk, /* move up the transient chain as far as possible first */ self = client_search_top_normal_parent(self); client_iconify_recursive(self, iconic, curdesk, hide_animation); - - /* try focus the window that was de-iconified if focusNew is on */ - if (!iconic && config_focus_new) - client_focus(self); } }