Compare commits

..

3 Commits

Author SHA1 Message Date
Leonardo Hernández Hernández
2783d91611 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)
2025-03-13 22:00:48 +01:00
Guido Cella
b2abff8b57 fix a use after free
This line makes dwl crash after closing mpv with the switchtotag patch.

(cherry picked from commit 8206cc8889994b3e9ce3c50abefc19367cf49a8e)
2025-03-13 21:59:55 +01:00
DreamMaoMao
298c6e1839 fix: crash when open some x11 app
(cherry picked from commit e0f531d5087cbd1223577c77262ec7476c157088)
2025-03-13 21:58:14 +01:00
2 changed files with 2 additions and 2 deletions

View File

@ -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

3
dwl.c
View File

@ -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);
@ -3143,7 +3142,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);