summaryrefslogtreecommitdiff
path: root/st/patches/st-newterm-0.9-tabbed.diff
diff options
context:
space:
mode:
Diffstat (limited to 'st/patches/st-newterm-0.9-tabbed.diff')
-rw-r--r--st/patches/st-newterm-0.9-tabbed.diff38
1 files changed, 38 insertions, 0 deletions
diff --git a/st/patches/st-newterm-0.9-tabbed.diff b/st/patches/st-newterm-0.9-tabbed.diff
new file mode 100644
index 0000000..a32c316
--- /dev/null
+++ b/st/patches/st-newterm-0.9-tabbed.diff
@@ -0,0 +1,38 @@
+From 88559b5cb6ed3f996fc00e923f9ded3c0b353fc5 Mon Sep 17 00:00:00 2001
+From: meator <meator.dev@gmail.com>
+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
+