]> Dogcows Code - chaz/openbox/commitdiff
ok unfocus before removing transient shit, but remove focus related flags so we don...
authorDana Jansens <danakj@orodu.net>
Sat, 27 Sep 2003 06:41:00 +0000 (06:41 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 27 Sep 2003 06:41:00 +0000 (06:41 +0000)
openbox/client.c

index 19b8c122a1b9392cc8af273b11920e1f983e8069..1e79e58505c1e3f7a9c43d37f35920382ddedd15 100644 (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);
 
This page took 0.028775 seconds and 4 git commands to generate.