]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
when ending actions which can move windows, and we were using the mouse, instead...
[chaz/openbox] / openbox / client.c
index 3d51a78e622e74212e8e724eeda74851d776cfe6..c4b106beaef6b2232041d08bcb2e005e8587bdb3 100644 (file)
@@ -3017,3 +3017,24 @@ int client_directional_edge_search(ObClient *c, ObDirection dir)
     }
     return dest;
 }
+
+ObClient* client_under_pointer()
+{
+    int x, y;
+    GList *it;
+    ObClient *ret = NULL;
+
+    if (screen_pointer_pos(&x, &y)) {
+        for (it = stacking_list; it != NULL; it = it->next) {
+            if (WINDOW_IS_CLIENT(it->data)) {
+                ObClient *c = WINDOW_AS_CLIENT(it->data);
+                if (c->desktop == screen_desktop &&
+                    RECT_CONTAINS(c->frame->area, x, y)) {
+                    ret = c;
+                    break;
+                }
+            }
+        }
+    }
+    return ret;
+}
This page took 0.025249 seconds and 4 git commands to generate.