From e6d06ed14b39c071a14bbcc064fb0d5130cf27a7 Mon Sep 17 00:00:00 2001 From: Palanix Date: Wed, 13 Oct 2021 22:06:30 +0200 Subject: [PATCH] It looks like the function only works if xdg_surface->role == TOPLEVEL, so I included a skip for WLR_XDG_SURFACE_ROLE_NONE --- dwl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dwl.c b/dwl.c index 4c0dfda..df44e9f 100644 --- a/dwl.c +++ b/dwl.c @@ -882,7 +882,7 @@ createnotify(struct wl_listener *listener, void *data) struct wlr_xdg_surface *xdg_surface = data; Client *c; - if (xdg_surface->role != WLR_XDG_SURFACE_ROLE_TOPLEVEL) { + if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP) { Client *sel = selclient(); struct wlr_box pop_box = { .x = sel->geom.x - selmon->m.x, @@ -894,6 +894,9 @@ createnotify(struct wl_listener *listener, void *data) return; } + if (xdg_surface->role != WLR_XDG_SURFACE_ROLE_TOPLEVEL) + return; + /* Allocate a Client for this surface */ c = xdg_surface->data = calloc(1, sizeof(*c)); c->surface.xdg = xdg_surface;