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:
parent
af7278b6e5
commit
fbed66cc81
1 changed files with 14 additions and 9 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue