From: Dana Jansens Date: Sat, 27 Sep 2003 05:19:15 +0000 (+0000) Subject: unfocus before unlinking the client from the transient tree X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=8aee387193fd73bbe4a8019bc7e31d5d0e18e83d;p=chaz%2Fopenbox unfocus before unlinking the client from the transient tree --- diff --git a/openbox/client.c b/openbox/client.c index c7d03a82..05f9d095 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -401,6 +401,15 @@ void client_unmanage(ObClient *self) influence */ screen_update_areas(); + 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); + } + /* tell our parent(s) that we're gone */ if (self->transient_for == OB_TRAN_GROUP) { /* transient of group */ GSList *it; @@ -427,15 +436,6 @@ 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)); - client_unfocus(self); - } - /* remove from its group */ if (self->group) { group_remove(self->group, self);