diff options
Diffstat (limited to 'pkg/st/patch')
| -rw-r--r-- | pkg/st/patch/0003-Add-support-for-plumbing-via-right-click.patch | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/pkg/st/patch/0003-Add-support-for-plumbing-via-right-click.patch b/pkg/st/patch/0003-Add-support-for-plumbing-via-right-click.patch index 83da9018..ec620c42 100644 --- a/pkg/st/patch/0003-Add-support-for-plumbing-via-right-click.patch +++ b/pkg/st/patch/0003-Add-support-for-plumbing-via-right-click.patch @@ -1,12 +1,12 @@ -From 278e0375c56b7a8abca4807163158e6811b01125 Mon Sep 17 00:00:00 2001 +From ff54d8fda487f9e73ec895f86639a57d749e5048 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Wed, 2 Dec 2020 17:54:35 -0800 Subject: [PATCH] Add support for plumbing via right click --- config.def.h | 5 ++++ - st.c | 74 +++++++++++++++++++++++++++++++++++++++++++--------- - 2 files changed, 67 insertions(+), 12 deletions(-) + st.c | 79 ++++++++++++++++++++++++++++++++++++++++++++-------- + 2 files changed, 72 insertions(+), 12 deletions(-) diff --git a/config.def.h b/config.def.h index 49ca50b..a63d2be 100644 @@ -22,7 +22,7 @@ index 49ca50b..a63d2be 100644 + */ +static char *plumb_cmd[] = {"plumb", NULL, NULL}; diff --git a/st.c b/st.c -index caa5aa0..e27ee51 100644 +index caa5aa0..02d5397 100644 --- a/st.c +++ b/st.c @@ -44,6 +44,9 @@ char *argv0; @@ -104,7 +104,7 @@ index caa5aa0..e27ee51 100644 void die(const char *errstr, ...) { -@@ -1227,15 +1271,13 @@ sigchld(int a) +@@ -1227,15 +1271,18 @@ sigchld(int a) int stat; pid_t p; @@ -117,7 +117,12 @@ index caa5aa0..e27ee51 100644 - if (!WIFEXITED(stat) || WEXITSTATUS(stat)) - die("child finished with error '%d'\n", stat); - exit(0); -+ while ((p = waitpid(-1, &stat, WNOHANG)) == 0) { ++ for (;;) { ++ p = waitpid(-1, &stat, WNOHANG); ++ if (p == 0) ++ break; ++ if (p < 0) ++ die("waitpid: %s\n", strerror(errno)); + if (pid == p) { + if (!WIFEXITED(stat) || WEXITSTATUS(stat)) + die("child finished with error '%d'\n", stat); @@ -127,7 +132,7 @@ index caa5aa0..e27ee51 100644 } -@@ -4223,16 +4265,23 @@ ptrbutton(void * data, struct wl_pointer * pointer, uint32_t serial, +@@ -4223,16 +4270,23 @@ ptrbutton(void * data, struct wl_pointer * pointer, uint32_t serial, switch (state) { case WL_POINTER_BUTTON_STATE_RELEASED: @@ -154,7 +159,7 @@ index caa5aa0..e27ee51 100644 } break; -@@ -4556,6 +4605,7 @@ main(int argc, char *argv[]) +@@ -4556,6 +4610,7 @@ main(int argc, char *argv[]) } ARGEND; run: @@ -163,5 +168,5 @@ index caa5aa0..e27ee51 100644 /* eat all remaining arguments */ opt_cmd = argv; -- -2.29.2 +2.30.1 |
