]> Dogcows Code - chaz/openbox/blobdiff - openbox/focus.c
get the size for all the apps before positioning them
[chaz/openbox] / openbox / focus.c
index 2ee2cf2f6037cb8f48f7ab30713c0faf7356f5c2..949a3291721be33c9aaed16b6dfb28aede962ba4 100644 (file)
@@ -1,5 +1,6 @@
 #include "event.h"
 #include "openbox.h"
+#include "grab.h"
 #include "framerender.h"
 #include "client.h"
 #include "config.h"
@@ -40,8 +41,7 @@ void focus_startup()
                                 -100, -100, 1, 1, 0,
                                  CopyFromParent, InputOutput, CopyFromParent,
                                  CWOverrideRedirect, &attrib);
-    XMapWindow(ob_display, focus_backup);
-    stacking_raise_internal(focus_backup);
+    XMapRaised(ob_display, focus_backup);
 
     /* start with nothing focused */
     focus_set_client(NULL);
@@ -272,6 +272,9 @@ Client *focus_cycle(gboolean forward, gboolean linear, gboolean done,
             client_activate(focus_cycle_target);
         goto done_cycle;
     }
+    if (!first)
+        grab_pointer(TRUE, None);
+
     if (!first) first = focus_client;
     if (!focus_cycle_target) focus_cycle_target = focus_client;
 
@@ -313,7 +316,10 @@ done_cycle:
     focus_cycle_target = NULL;
     g_list_free(order);
     order = NULL;
+
     popup_cycle(ft, FALSE);
+    grab_pointer(FALSE, None);
+
     return NULL;
 }
 
This page took 0.021839 seconds and 4 git commands to generate.