From: Dana Jansens Date: Sat, 27 Sep 2003 06:41:00 +0000 (+0000) Subject: ok unfocus before removing transient shit, but remove focus related flags so we don... X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=fbed66cc8166e84e1c194b53d0e8a1c28e6e1b07;p=chaz%2Fopenbox ok unfocus before removing transient shit, but remove focus related flags so we don't get focused in the fallback. --- diff --git a/openbox/client.c b/openbox/client.c index 19b8c122..1e79e585 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -406,6 +406,20 @@ void client_unmanage(ObClient *self) func(self); } + if (focus_client == self) { + XEvent e; + + /* focus the last focused window on the desktop, and ignore enter + events from the unmap so it doesnt mess with the focus */ + while (XCheckTypedEvent(ob_display, EnterNotify, &e)); + /* remove these flags so we don't end up getting focused in the + fallback! */ + self->can_focus = FALSE; + self->focus_notify = FALSE; + self->modal = FALSE; + client_unfocus(self); + } + /* tell our parent(s) that we're gone */ if (self->transient_for == OB_TRAN_GROUP) { /* transient of group */ GSList *it; @@ -433,15 +447,6 @@ void client_unmanage(ObClient *self) self->group = NULL; } - if (focus_client == self) { - XEvent e; - - /* focus the last focused window on the desktop, and ignore enter - events from the unmap so it doesnt mess with the focus */ - while (XCheckTypedEvent(ob_display, EnterNotify, &e)); - client_unfocus(self); - } - /* give the client its border back */ client_toggle_border(self, TRUE);