From 071c213bebfda704af69ddb8f7637da340f5a044 Mon Sep 17 00:00:00 2001 From: sdk Date: Sun, 19 Dec 2021 13:58:26 +0000 Subject: [PATCH] Let spectrwm quit when X dies. Fix proposed to upstream in PR https://github.com/conformal/spectrwm/pull/478 ok bket@ --- x11/spectrwm/Makefile | 4 ++-- x11/spectrwm/patches/patch-spectrwm_c | 13 ++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/x11/spectrwm/Makefile b/x11/spectrwm/Makefile index f0a97f61208..478534d1a85 100644 --- a/x11/spectrwm/Makefile +++ b/x11/spectrwm/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.37 2021/01/24 15:41:37 mglocker Exp $ +# $OpenBSD: Makefile,v 1.38 2021/12/19 13:58:26 sdk Exp $ COMMENT= small tiling window manager @@ -8,7 +8,7 @@ GH_PROJECT= spectrwm GH_TAGNAME= SPECTRWM_${V:S/./_/g} DISTNAME= ${GH_PROJECT}-${V} -REVISION= 1 +REVISION= 2 SHARED_LIBS= swmhack 1.0 diff --git a/x11/spectrwm/patches/patch-spectrwm_c b/x11/spectrwm/patches/patch-spectrwm_c index b5d98feca78..138b9af54fc 100644 --- a/x11/spectrwm/patches/patch-spectrwm_c +++ b/x11/spectrwm/patches/patch-spectrwm_c @@ -1,6 +1,7 @@ -$OpenBSD: patch-spectrwm_c,v 1.16 2021/01/23 18:34:17 bket Exp $ +$OpenBSD: patch-spectrwm_c,v 1.17 2021/12/19 13:58:26 sdk Exp $ Needs wpath pledge. Tahen from https://github.com/conformal/spectrwm/pull/425 +Let spectrwm quit when X dies. Taken from https://github.com/conformal/spectrwm/pull/478 Index: spectrwm.c --- spectrwm.c.orig @@ -41,3 +42,13 @@ Index: spectrwm.c err(1, "pledge"); validate_spawns(); +@@ -13762,6 +13762,9 @@ main(int argc, char *argv[]) + restart(NULL, NULL, NULL); + + if (!running) ++ goto done; ++ ++ if(xcb_connection_has_error(conn)) + goto done; + + if (stdin_ready) {