From e0f531d5087cbd1223577c77262ec7476c157088 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Wed, 12 Mar 2025 16:27:47 +0800 Subject: [PATCH 1/2] fix: crash when open some x11 app --- dwl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwl.c b/dwl.c index ec4ca86..395b81d 100644 --- a/dwl.c +++ b/dwl.c @@ -3148,7 +3148,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 4456f4536a483c127909151a84d7b62da4f40e8b Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Wed, 12 Mar 2025 16:17:44 +0800 Subject: [PATCH 2/2] fix: shouldn't configure uninitialized layer_surface --- dwl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dwl.c b/dwl.c index 395b81d..4816159 100644 --- a/dwl.c +++ b/dwl.c @@ -551,6 +551,9 @@ arrangelayer(Monitor *m, struct wl_list *list, struct wlr_box *usable_area, int wl_list_for_each(l, list, link) { struct wlr_layer_surface_v1 *layer_surface = l->layer_surface; + if (!layer_surface->initialized) + continue; + if (exclusive != (layer_surface->current.exclusive_zone > 0)) continue;