commit 5ccce4f11ad1e6b99650bf268d45951ed05f87ee
parent ca69b210a686b350a20060f1b586ab2840847d68
Author: hhvn <dev@hhvn.uk>
Date: Sat, 23 Oct 2021 01:25:47 +0100
config.h tabbed.c: toggle focusing on newly embedded windows
Diffstat:
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/config.h b/config.h
@@ -14,6 +14,7 @@ static const char titletrim[] = "...";
static const int tabwidth = 200;
static const Bool foreground = True;
static Bool urgentswitch = False;
+static const Bool focusnew = False; /* focus on a newly embedded window */
/*
* Where to place a new tab when it is opened. When npisrelative is True,
diff --git a/tabbed.c b/tabbed.c
@@ -294,9 +294,15 @@ void
createnotify(const XEvent *e)
{
const XCreateWindowEvent *ev = &e->xcreatewindow;
+ Arg a;
if (ev->window != win && getclient(ev->window) < 0)
manage(ev->window);
+
+ if (!focusnew) {
+ a.i = +1;
+ rotate(&a);
+ }
}
void