all repos — openbox @ d6f9bc953ac7cd29f69563c96b6c8991fed8f6d8

openbox fork - make it a bit more like ryudo

allow specifying that some focus events should be ignored for the focus order list
Dana Jansens danakj@orodu.net
commit

d6f9bc953ac7cd29f69563c96b6c8991fed8f6d8

parent

ec4e24a42269b44c9585176943f76310495536ea

3 files changed, 10 insertions(+), 1 deletions(-)

jump to
M openbox/action.copenbox/action.c

@@ -709,6 +709,7 @@ if (it == NULL) it = g_list_last(list);

} if (client_focus(it->data)) { t = it->data; + focus_ignore_in++; break; } } while (it != start);
M openbox/focus.copenbox/focus.c

@@ -18,6 +18,7 @@

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 @@ old = focus_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);
M openbox/focus.hopenbox/focus.h

@@ -12,6 +12,10 @@

/*! 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;