1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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
|