]> Dogcows Code - chaz/openbox/commitdiff
allow specifying that some focus events should be ignored for the focus order list
authorDana Jansens <danakj@orodu.net>
Sat, 5 Apr 2003 22:56:10 +0000 (22:56 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 5 Apr 2003 22:56:10 +0000 (22:56 +0000)
openbox/action.c
openbox/focus.c
openbox/focus.h

index 53d46cde9970b628aca3107cee32d3c79e181184..a83d19dff39195b7a38049a2ddfb1dfe4395eb28 100644 (file)
@@ -709,6 +709,7 @@ void action_cycle_windows(union ActionData *data)
             }
             if (client_focus(it->data)) {
                 t = it->data;
+                focus_ignore_in++;
                 break;
             }
         } while (it != start);
index 3989404685d08cda2977bbd5beca9ec230467120..4ff85c5d4ae74cb2afea62196b1faedfd4518602 100644 (file)
@@ -18,6 +18,7 @@ GList **focus_order = NULL; /* these lists are created when screen_startup
 Window focus_backup = None;
 gboolean focus_new = TRUE;
 gboolean focus_follow = TRUE;
+int focus_ignore_in = 0;
 
 static void parse_assign(char *name, ParseToken *value)
 {
@@ -99,7 +100,10 @@ void focus_set_client(Client *client)
     focus_client = client;
 
     /* move to the top of the list */
-    if (client != NULL) {
+    if (focus_ignore_in) {
+        g_assert(focus_ignore_in > 0);
+        --focus_ignore_in;
+    } else if (client != NULL) {
         desktop = client->desktop;
         if (desktop == DESKTOP_ALL) desktop = screen_desktop;
         focus_order[desktop] = g_list_remove(focus_order[desktop], client);
index 8a511cf32e3e7b4fccce328ee884bec6bf4f7527..976b50dfdf73a7ebf8e9c747d8105c71e5c9f8d3 100644 (file)
@@ -12,6 +12,10 @@ extern Window focus_backup;
 /*! The client which is currently focused */
 extern struct Client *focus_client;
 
+/* The number of FocusIn events which should be ignored for tracking the focus
+   order */
+extern int focus_ignore_in;
+
 /*! The recent focus order on each desktop */
 extern GList **focus_order;
 
This page took 0.027415 seconds and 4 git commands to generate.