From f0ad1117bae4487be5496b56b33a359839c60a61 Mon Sep 17 00:00:00 2001 From: bakkeby Date: Fri, 6 Jan 2023 08:43:55 +0100 Subject: [PATCH 1/4] Hardcoding xsessions directory to /usr/share/xsessions as suggested in #317 --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 01ea136..448dbaa 100644 --- a/Makefile +++ b/Makefile @@ -65,13 +65,13 @@ endif mkdir -p ${DESTDIR}${MANPREFIX}/man1 sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1 chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1 - mkdir -p ${DESTDIR}${PREFIX}/share/xsession - cp -n dwm.desktop ${DESTDIR}${PREFIX}/share/xsession - chmod 644 ${DESTDIR}${PREFIX}/share/xsession/dwm.desktop + sudo mkdir -p /usr/share/xsessions + sudo cp -n dwm.desktop /usr/share/xsessions + sudo chmod 644 /usr/share/xsessions/dwm.desktop uninstall: rm -f ${DESTDIR}${PREFIX}/bin/dwm\ ${DESTDIR}${MANPREFIX}/man1/dwm.1\ - ${DESTDIR}${PREFIX}/share/xsession/dwm.desktop + /usr/share/xsessions/dwm.desktop .PHONY: all options clean dist install uninstall From 3b72e139ecd755ed8c782d74d1972fa95ac07e44 Mon Sep 17 00:00:00 2001 From: bakkeby Date: Sun, 8 Jan 2023 10:20:34 +0100 Subject: [PATCH 2/4] Revert "Hardcoding xsessions directory to /usr/share/xsessions as suggested in #317" This reverts commit f0ad1117bae4487be5496b56b33a359839c60a61. --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 448dbaa..01ea136 100644 --- a/Makefile +++ b/Makefile @@ -65,13 +65,13 @@ endif mkdir -p ${DESTDIR}${MANPREFIX}/man1 sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1 chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1 - sudo mkdir -p /usr/share/xsessions - sudo cp -n dwm.desktop /usr/share/xsessions - sudo chmod 644 /usr/share/xsessions/dwm.desktop + mkdir -p ${DESTDIR}${PREFIX}/share/xsession + cp -n dwm.desktop ${DESTDIR}${PREFIX}/share/xsession + chmod 644 ${DESTDIR}${PREFIX}/share/xsession/dwm.desktop uninstall: rm -f ${DESTDIR}${PREFIX}/bin/dwm\ ${DESTDIR}${MANPREFIX}/man1/dwm.1\ - /usr/share/xsessions/dwm.desktop + ${DESTDIR}${PREFIX}/share/xsession/dwm.desktop .PHONY: all options clean dist install uninstall From 2a8e68c5df402b882a7558ec8722eae6d3c3eeca Mon Sep 17 00:00:00 2001 From: bakkeby Date: Sun, 8 Jan 2023 10:22:37 +0100 Subject: [PATCH 3/4] Correcting path to /usr/local/share/xsessions/ ref. #317 --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 01ea136..65c9b5a 100644 --- a/Makefile +++ b/Makefile @@ -65,13 +65,13 @@ endif mkdir -p ${DESTDIR}${MANPREFIX}/man1 sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1 chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1 - mkdir -p ${DESTDIR}${PREFIX}/share/xsession - cp -n dwm.desktop ${DESTDIR}${PREFIX}/share/xsession - chmod 644 ${DESTDIR}${PREFIX}/share/xsession/dwm.desktop + mkdir -p ${DESTDIR}${PREFIX}/share/xsessions + cp -n dwm.desktop ${DESTDIR}${PREFIX}/share/xsessions + chmod 644 ${DESTDIR}${PREFIX}/share/xsessions/dwm.desktop uninstall: rm -f ${DESTDIR}${PREFIX}/bin/dwm\ ${DESTDIR}${MANPREFIX}/man1/dwm.1\ - ${DESTDIR}${PREFIX}/share/xsession/dwm.desktop + ${DESTDIR}${PREFIX}/share/xsessions/dwm.desktop .PHONY: all options clean dist install uninstall From 6b7246cb9031546402ec8c8e9151e445a22a271b Mon Sep 17 00:00:00 2001 From: bakkeby Date: Fri, 13 Jan 2023 16:19:33 +0100 Subject: [PATCH 4/4] zoomswap: proposed changes to ensure that previous zooms references are cleared when unmanaging a client ref. #324 --- dwm.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/dwm.c b/dwm.c index 7dbf150..9fe65b9 100644 --- a/dwm.c +++ b/dwm.c @@ -4352,7 +4352,7 @@ unfocus(Client *c, int setfocus, Client *nextfocus) void unmanage(Client *c, int destroyed) { - Monitor *m = c->mon; + Monitor *m; #if SWITCHTAG_PATCH unsigned int switchtag = c->switchtag; #endif // SWITCHTAG_PATCH @@ -4361,6 +4361,24 @@ unmanage(Client *c, int destroyed) XkbInfo *xkb; #endif // XKB_PATCH + #if ZOOMSWAP_PATCH + /* Make sure to clear any previous zoom references to the client being removed. */ + #if PERTAG_PATCH + int i; + for (m = mons; m; m = m->next) { + for (i = 0; i <= NUMTAGS; i++) { + if (m->pertag->prevzooms[i] == c) { + m->pertag->prevzooms[i] = NULL; + } + } + } + #else + if (c == prevzoom) + prevzoom = NULL; + #endif // PERTAG_PATCH + #endif // ZOOMSWAP_PATCH + m = c->mon; + #if SWALLOW_PATCH if (c->swallowing) { unswallow(c);