From d6f9bc953ac7cd29f69563c96b6c8991fed8f6d8 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 5 Apr 2003 22:56:10 +0000 Subject: [PATCH] allow specifying that some focus events should be ignored for the focus order list --- openbox/action.c | 1 + openbox/focus.c | 6 +++++- openbox/focus.h | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/openbox/action.c b/openbox/action.c index 53d46cde..a83d19df 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -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); diff --git a/openbox/focus.c b/openbox/focus.c index 39894046..4ff85c5d 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -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); diff --git a/openbox/focus.h b/openbox/focus.h index 8a511cf3..976b50df 100644 --- a/openbox/focus.h +++ b/openbox/focus.h @@ -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; -- 2.39.2