all repos — openbox @ fbed66cc8166e84e1c194b53d0e8a1c28e6e1b07

openbox fork - make it a bit more like ryudo

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
commit

fbed66cc8166e84e1c194b53d0e8a1c28e6e1b07

parent

af7278b6e5f0c67fb5b19c8800a4b79aa043e7a9

1 files changed, 14 insertions(+), 9 deletions(-)

jump to
M openbox/client.copenbox/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 */