]> Dogcows Code - chaz/openbox/commitdiff
don't check for the root window in the window hash tables. waste of cpu
authorDana Jansens <danakj@orodu.net>
Thu, 24 Jan 2008 19:41:46 +0000 (14:41 -0500)
committerDana Jansens <danakj@orodu.net>
Thu, 31 Jan 2008 17:26:22 +0000 (12:26 -0500)
openbox/event.c

index 2e3a44c56a63f64a7c301c7b0de2e8a977ce7eef..8443e08c3253dd1e14866b8bbd3685224ec2e091 100644 (file)
@@ -465,7 +465,9 @@ static void event_process(const XEvent *ec, gpointer data)
     e = &ee;
 
     window = event_get_window(e);
-    if ((obwin = window_find(window))) {
+    if (window == obt_root(ob_screen))
+        /* don't do any lookups, waste of cpu */;
+    else if ((obwin = window_find(window))) {
         switch (obwin->type) {
         case OB_WINDOW_CLASS_DOCK:
             dock = WINDOW_AS_DOCK(obwin);
@@ -1227,14 +1229,14 @@ static void event_handle_client(ObClient *client, XEvent *e)
         break;
     }
     case UnmapNotify:
-        if (client->ignore_unmaps) {
-            client->ignore_unmaps--;
-            break;
-        }
         ob_debug("UnmapNotify for window 0x%x eventwin 0x%x sendevent %d "
                  "ignores left %d\n",
                  client->window, e->xunmap.event, e->xunmap.from_configure,
                  client->ignore_unmaps);
+        if (client->ignore_unmaps) {
+            client->ignore_unmaps--;
+            break;
+        }
         client_unmanage(client);
         break;
     case DestroyNotify:
This page took 0.024126 seconds and 4 git commands to generate.