ok unfocus before removing transient shit, but remove focus related flags so we don't get focused in the fallback.
Dana Jansens danakj@orodu.net
1 files changed,
14 insertions(+),
9 deletions(-)
jump to
M
openbox/client.c
→
openbox/client.c
@@ -406,6 +406,20 @@ GDestroyNotify func = (GDestroyNotify) it->data;
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;@@ -431,15 +445,6 @@ /* remove from its group */
if (self->group) { group_remove(self->group, 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 */