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;