From 718072450234bac1654d29091a89930f1da67705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?= Date: Fri, 18 Aug 2023 21:36:26 -0600 Subject: [PATCH] WIP: don't use reaper --- dwl.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dwl.c b/dwl.c index 72d3c73..64abca6 100644 --- a/dwl.c +++ b/dwl.c @@ -2730,10 +2730,13 @@ void activatex11(struct wl_listener *listener, void *data) { Client *c = wl_container_of(listener, c, activate); + Client *sel = focustop(selmon); - /* Only "managed" windows can be activated */ - if (c->type == X11Managed) - wlr_xwayland_surface_activate(c->surface.xwayland, 1); + if ((!c->surface.xwayland->surface || !c->surface.xwayland->surface->mapped) + || (sel && sel->type != XDGShell && sel->surface.xwayland->pid != c->surface.xwayland->pid)) + return; + + focusclient(c, 1); } void