From 88559b5cb6ed3f996fc00e923f9ded3c0b353fc5 Mon Sep 17 00:00:00 2001 From: meator Date: Wed, 26 Oct 2022 14:06:49 +0200 Subject: [PATCH] Make newterm work with the tabbed patch This commit is an updated version of st-newterm-0.8.2-tabbed.diff. --- st.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/st.c b/st.c index 0261283..e4a9021 100644 --- a/st.c +++ b/st.c @@ -1061,6 +1061,7 @@ tswapscreen(void) void newterm(const Arg* a) { + char *tabbed_win; switch (fork()) { case -1: die("fork failed: %s\n", strerror(errno)); @@ -1073,7 +1074,11 @@ newterm(const Arg* a) break; case 0: chdir_by_pid(pid); - execl("/proc/self/exe", argv0, NULL); + tabbed_win = getenv("XEMBED"); + if (tabbed_win) + execl("/proc/self/exe", argv0, "-w", tabbed_win, NULL); + else + execl("/proc/self/exe", argv0, NULL); _exit(1); break; default: -- 2.38.0