]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
Remove newline from startupnotify description
[chaz/openbox] / openbox / client.c
index 016a660fd486b9875b27714813cbc6db6dd0e959..c1af196b5f08e90403cdd7c47fe0ba96a4515a18 100644 (file)
@@ -313,7 +313,7 @@ void client_manage(Window window, ObPrompt *prompt)
 
     ob_debug("Window type: %d\n", self->type);
     ob_debug("Window group: 0x%x\n", self->group?self->group->leader:0);
-    ob_debug("Window name: %s class: %s\n", self->name, self->class);
+    ob_debug("Window name: %s class: %s role: %s\n", self->name, self->class, self->role);
 
     /* per-app settings override stuff from client_get_all, and return the
        settings for other uses too. the returned settings is a shallow copy,
@@ -3591,18 +3591,38 @@ ObClient *client_search_modal_child(ObClient *self)
     return NULL;
 }
 
+static gboolean client_validate_unmap(ObClient *self, int n)
+{
+    XEvent e;
+    gboolean ret = TRUE;
+
+    if (XCheckTypedWindowEvent(ob_display, self->window, UnmapNotify, &e)) {
+        if (n < self->ignore_unmaps) // ignore this one, but look for more
+            ret = client_validate_unmap(self, n+1);
+        else
+            ret = FALSE; // the window is going to become unmanaged
+
+        /* put them back on the event stack so they end up in the same order */
+        XPutBackEvent(ob_display, &e);
+    }
+
+    return ret;
+}
+
 gboolean client_validate(ObClient *self)
 {
     XEvent e;
 
     XSync(ob_display, FALSE); /* get all events on the server */
 
-    if (XCheckTypedWindowEvent(ob_display, self->window, DestroyNotify, &e) ||
-        XCheckTypedWindowEvent(ob_display, self->window, UnmapNotify, &e)) {
+    if (XCheckTypedWindowEvent(ob_display, self->window, DestroyNotify, &e)) {
         XPutBackEvent(ob_display, &e);
         return FALSE;
     }
 
+    if (!client_validate_unmap(self, 0))
+        return FALSE;
+
     return TRUE;
 }
 
This page took 0.025381 seconds and 4 git commands to generate.