X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=fbfc15b1ab4548f7af7eaa29073ecb55f00f478e;hb=53109b7592500b71f8c670ea58b0182193ba9a71;hp=569718c333287925aaf6dccf0637de378bc5e082;hpb=270a5b25df8db500f94a7c29430ebc224ddf18b2;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index 569718c3..fbfc15b1 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -639,7 +639,7 @@ static ObAppSettings *client_get_settings_state(ObClient *self) GSList *it; for (it = config_per_app_settings; it; it = g_slist_next(it)) { - ObAppSettings *app; + ObAppSettings *app = it->data; if ((app->name && !app->class && !strcmp(app->name, self->name)) || (app->class && !app->name && !strcmp(app->class, self->class)) @@ -2121,9 +2121,14 @@ void client_showhide(ObClient *self) if (!self->frame->visible) frame_show(self->frame); } - else if (self->frame->visible) + else if (self->frame->visible) { frame_hide(self->frame); + /* Fall back focus since we're disappearing */ + if (focus_client == self) + client_unfocus(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! @@ -2505,10 +2510,6 @@ static void client_iconify_recursive(ObClient *self, bottom'. */ focus_order_to_top(self); - /* Fall back focus since we're disappearing */ - if (focus_client == self) - client_unfocus(self); - changed = TRUE; } } else {