]> Dogcows Code - chaz/openbox/blobdiff - openbox/focus.c
add support for interactive/keyboard move/resize
[chaz/openbox] / openbox / focus.c
index 7542fae66577bccd1184ad510f3fc285d0ce688b..cd08ab68c82dbc358c8edd5cf34362f638a4a2b1 100644 (file)
@@ -9,7 +9,7 @@
 #include "dispatch.h"
 #include "focus.h"
 #include "parse.h"
-#include "engine.h"
+#include "stacking.h"
 
 #include <X11/Xlib.h>
 #include <glib.h>
@@ -36,7 +36,8 @@ void focus_startup()
                                 -100, -100, 1, 1, 0,
                                  CopyFromParent, InputOutput, CopyFromParent,
                                  CWOverrideRedirect, &attrib);
-    XMapRaised(ob_display, focus_backup);
+    XMapWindow(ob_display, focus_backup);
+    stacking_raise_internal(focus_backup);
 
     /* start with nothing focused */
     focus_set_client(NULL);
@@ -105,12 +106,10 @@ void focus_set_client(Client *client)
 
 static gboolean focus_under_pointer()
 {
-    Window w;
-    int i, x, y;
-    guint u;
+    int x, y;
     GList *it;
 
-    if (XQueryPointer(ob_display, ob_root, &w, &w, &x, &y, &i, &i, &u)) {
+    if (ob_pointer_pos(&x, &y)) {
         for (it = stacking_list; it != NULL; it = it->next) {
             Client *c = it->data;
             if (c->desktop == screen_desktop &&
This page took 0.02837 seconds and 4 git commands to generate.