]> code.delx.au - spectrwm/commitdiff
Implement quirk NOFOCUSCYCLE to remove a window from the normal focus cycle.
authorYuri D'Elia <yuri.delia@eurac.edu>
Sat, 22 Mar 2014 20:46:17 +0000 (21:46 +0100)
committerMarco Peereboom <marco@peereboom.us>
Tue, 17 Feb 2015 18:42:33 +0000 (12:42 -0600)
spectrwm.1
spectrwm.c

index 3df76e11bec4d57b9fed4a4bc03c98cb15290254..837b5dbf1f76fa646d2b17a8bfdc3235eae187ab 100644 (file)
@@ -1024,6 +1024,9 @@ Remove border to allow window to use full region size.
 .It FOCUSPREV
 On exit force focus on previously focused application not previous
 application in the stack.
+.It NOFOCUSCYCLE
+Remove from normal focus cycle (focus_prev or focus_next). The window can
+still be focused using search_win.
 .It NOFOCUSONMAP
 Don't change focus to the window when it first appears on the screen.
 Has no effect when
index b0e2d5081f684fa68401fad537ca3121667a01f3..680f5c1b6242be19590aeaed7782e6208cf09bd5 100644 (file)
@@ -681,6 +681,7 @@ struct quirk {
 #define SWM_Q_OBEYAPPFOCUSREQ  (1<<8)  /* Focus when applications ask. */
 #define SWM_Q_IGNOREPID                (1<<9)  /* Ignore PID when determining ws. */
 #define SWM_Q_IGNORESPAWNWS    (1<<10) /* Ignore _SWM_WS when managing win. */
+#define SWM_Q_NOFOCUSCYCLE     (1<<11) /* Remove from normal focus cycle. */
 };
 TAILQ_HEAD(quirk_list, quirk);
 struct quirk_list              quirks = TAILQ_HEAD_INITIALIZER(quirks);
@@ -4395,7 +4396,8 @@ focus(struct swm_region *r, union arg *args)
                } while (winfocus && (ICONIC(winfocus) ||
                    winfocus->id == cur_focus->transient ||
                    (cur_focus->transient != XCB_WINDOW_NONE &&
-                   winfocus->transient == cur_focus->transient)));
+                   winfocus->transient == cur_focus->transient) ||
+                   (winfocus->quirks & SWM_Q_NOFOCUSCYCLE)));
                break;
        case SWM_ARG_ID_FOCUSNEXT:
                if (cur_focus == NULL)
@@ -4411,7 +4413,8 @@ focus(struct swm_region *r, union arg *args)
                } while (winfocus && (ICONIC(winfocus) ||
                    winfocus->id == cur_focus->transient ||
                    (cur_focus->transient != XCB_WINDOW_NONE &&
-                   winfocus->transient == cur_focus->transient)));
+                   winfocus->transient == cur_focus->transient) ||
+                   (winfocus->quirks & SWM_Q_NOFOCUSCYCLE)));
                break;
        case SWM_ARG_ID_FOCUSMAIN:
                if (cur_focus == NULL)
@@ -7717,6 +7720,7 @@ const char *quirkname[] = {
        "OBEYAPPFOCUSREQ",
        "IGNOREPID",
        "IGNORESPAWNWS",
+       "NOFOCUSCYCLE",
 };
 
 /* SWM_Q_DELIM: retain '|' for back compat for now (2009-08-11) */