diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-09-27 06:41:00 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-09-27 06:41:00 +0000 |
| commit | fbed66cc8166e84e1c194b53d0e8a1c28e6e1b07 (patch) | |
| tree | 29f1471d2ed5c98cedd79d0f1371c8f05d8af211 /openbox | |
| parent | af7278b6e5f0c67fb5b19c8800a4b79aa043e7a9 (diff) | |
ok unfocus before removing transient shit, but remove focus related flags so we don't get focused in the fallback.
Diffstat (limited to 'openbox')
| -rw-r--r-- | openbox/client.c | 23 |
1 files changed, 14 insertions, 9 deletions
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); |
