Add a configuration option for fullscreen locking
authorQuentin Rameau <quinq@fifth.space>
Mon, 12 Jul 2021 21:44:16 +0000 (23:44 +0200)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Wed, 14 Jul 2021 09:26:37 +0000 (11:26 +0200)
Some people are annoyed to have this new behaviour forced for some
application which use fake fullscreen.

config.def.h
dwm.c

index 1c0b587bda10649ab20da2b4b58578dcf413cfd0..a2ac963acc73a1224ef8ceb47d08da454a43bce5 100644 (file)
@@ -35,6 +35,7 @@ static const Rule rules[] = {
 static const float mfact     = 0.55; /* factor of master area size [0.05..0.95] */
 static const int nmaster     = 1;    /* number of clients in master area */
 static const int resizehints = 1;    /* 1 means respect size hints in tiled resizals */
+static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
 
 static const Layout layouts[] = {
        /* symbol     arrange function */
diff --git a/dwm.c b/dwm.c
index b0b3466881b84872a6b261cc1ed42afed08ac3bd..5e4d49484e8e7bd3ff8c00b6b422af93502e5802 100644 (file)
--- a/dwm.c
+++ b/dwm.c
@@ -835,7 +835,7 @@ focusstack(const Arg *arg)
 {
        Client *c = NULL, *i;
 
-       if (!selmon->sel || selmon->sel->isfullscreen)
+       if (!selmon->sel || (selmon->sel->isfullscreen && lockfullscreen))
                return;
        if (arg->i > 0) {
                for (c = selmon->sel->next; c && !ISVISIBLE(c); c = c->next);