]> Dogcows Code - chaz/openbox/blobdiff - openbox/focus.c
missed a case of using the stacking list and assuming that its all clients still...
[chaz/openbox] / openbox / focus.c
index 949a3291721be33c9aaed16b6dfb28aede962ba4..ebe93a76acc2cc651fa1cdf7c79186d517dc0fb1 100644 (file)
@@ -122,13 +122,17 @@ static gboolean focus_under_pointer()
 
     if (ob_pointer_pos(&x, &y)) {
         for (it = stacking_list; it != NULL; it = it->next) {
-            Client *c = it->data;
-            if (c->desktop == screen_desktop &&
-                RECT_CONTAINS(c->frame->area, x, y))
-                break;
+            if (WINDOW_IS_CLIENT(it->data)) {
+                Client *c = WINDOW_AS_CLIENT(it->data);
+                if (c->desktop == screen_desktop &&
+                    RECT_CONTAINS(c->frame->area, x, y))
+                    break;
+            }
         }
-        if (it != NULL)
+        if (it != NULL) {
+            g_assert(WINDOW_IS_CLIENT(it->data));
             return client_normal(it->data) && client_focus(it->data);
+        }
     }
     return FALSE;
 }
This page took 0.020408 seconds and 4 git commands to generate.