ok unfocus before removing transient shit, but remove focus related flags so we don't get focused in the fallback.

This commit is contained in:
Dana Jansens 2003-09-27 06:41:00 +00:00
parent af7278b6e5
commit fbed66cc81

View file

@ -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);