From 298c6e18397fb9fac8abf44f4cdf0966d8dfa27a Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Wed, 12 Mar 2025 16:27:47 +0800 Subject: [PATCH 1/3] fix: crash when open some x11 app (cherry picked from commit e0f531d5087cbd1223577c77262ec7476c157088) --- dwl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwl.c b/dwl.c index def2562..efffbbe 100644 --- a/dwl.c +++ b/dwl.c @@ -3143,7 +3143,7 @@ sethints(struct wl_listener *listener, void *data) { Client *c = wl_container_of(listener, c, set_hints); struct wlr_surface *surface = client_surface(c); - if (c == focustop(selmon)) + if (c == focustop(selmon) || !c->surface.xwayland->hints) return; c->isurgent = xcb_icccm_wm_hints_get_urgency(c->surface.xwayland->hints); From b2abff8b57166484c1c89d271966b2dcb362359a Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Sat, 7 Sep 2024 21:22:40 +0200 Subject: [PATCH 2/3] fix a use after free This line makes dwl crash after closing mpv with the switchtotag patch. (cherry picked from commit 8206cc8889994b3e9ce3c50abefc19367cf49a8e) --- dwl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/dwl.c b/dwl.c index efffbbe..cf3ef70 100644 --- a/dwl.c +++ b/dwl.c @@ -1177,7 +1177,6 @@ void destroydecoration(struct wl_listener *listener, void *data) { Client *c = wl_container_of(listener, c, destroy_decoration); - c->decoration = NULL; wl_list_remove(&c->destroy_decoration.link); wl_list_remove(&c->set_decoration_mode.link); From 2783d91611a027cfecc43a39689b6e589578a88b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?= Date: Fri, 15 Nov 2024 00:17:43 -0600 Subject: [PATCH 3/3] remove binary before copying to destination Since Linux 6.11 is possible overwrite a running executable, possibly making it crash. Thanks to: movq42rax Fixes: https://codeberg.org/dwl/dwl/issues/709 References: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2a010c412853 References: https://lore.kernel.org/stable/CACKH++YAtEMYu2nTLUyfmxZoGO37fqogKMDkBpddmNaz5HE6ng@mail.gmail.com/T/#u (cherry picked from commit 1d08ade13225343890e3476f7c4003ab87dc266c) --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 3358bae..ff53040 100644 --- a/Makefile +++ b/Makefile @@ -61,6 +61,7 @@ dist: clean install: dwl mkdir -p $(DESTDIR)$(PREFIX)/bin + rm -f $(DESTDIR)$(PREFIX)/bin/dwl cp -f dwl $(DESTDIR)$(PREFIX)/bin chmod 755 $(DESTDIR)$(PREFIX)/bin/dwl mkdir -p $(DESTDIR)$(MANDIR)/man1