summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-09-27 06:30:51 +0000
committerDana Jansens <danakj@orodu.net>2003-09-27 06:30:51 +0000
commitaf7278b6e5f0c67fb5b19c8800a4b79aa043e7a9 (patch)
tree94d59ec194bb68cd38970c0fb8adb88f2b81e1fc
parentbc1148f0b304dc74736d124696cdede969c3b739 (diff)
that was a really bad idea, i didnt mean it, i swear
-rw-r--r--openbox/client.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/openbox/client.c b/openbox/client.c
index 05f9d095..19b8c122 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -401,15 +401,11 @@ 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);
+ for (it = client_destructors; it; it = g_slist_next(it)) {
+ GDestroyNotify func = (GDestroyNotify) it->data;
+ func(self);
}
-
+
/* tell our parent(s) that we're gone */
if (self->transient_for == OB_TRAN_GROUP) { /* transient of group */
GSList *it;
@@ -419,8 +415,8 @@ void client_unmanage(ObClient *self)
((ObClient*)it->data)->transients =
g_slist_remove(((ObClient*)it->data)->transients, self);
} else if (self->transient_for) { /* transient of window */
- self->transient_for->transients =
- g_slist_remove(self->transient_for->transients, self);
+ self->transient_for->transients =
+ g_slist_remove(self->transient_for->transients, self);
}
/* tell our transients that we're gone */
@@ -431,17 +427,21 @@ void client_unmanage(ObClient *self)
}
}
- for (it = client_destructors; it; it = g_slist_next(it)) {
- GDestroyNotify func = (GDestroyNotify) it->data;
- func(self);
- }
-
/* remove from its group */
if (self->group) {
group_remove(self->group, 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);