]> Dogcows Code - chaz/openbox/blobdiff - openbox/focus.c
ignore errors when playing with application defined colormaps
[chaz/openbox] / openbox / focus.c
index 4fa123cbaf594ffb13493281ac92536632024669..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);
@@ -268,16 +268,13 @@ Client *focus_cycle(gboolean forward, gboolean linear, gboolean done,
             frame_adjust_focus(focus_client->frame, TRUE);
         goto done_cycle;
     } else if (done) {
-        if (focus_cycle_target) {
-            if (focus_cycle_target->iconic)
-                client_iconify(focus_cycle_target, FALSE, FALSE);
-            if (focus_cycle_target->shaded)
-                client_shade(focus_cycle_target, FALSE);
-            client_focus(focus_cycle_target);
-            stacking_raise(focus_cycle_target);
-        }
+        if (focus_cycle_target)
+            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;
 
@@ -319,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.025536 seconds and 4 git commands to generate.