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