From 4ae6d0f3873451306e1ef04d88e0fab4e2b04548 Mon Sep 17 00:00:00 2001
From: Leonardo Hernández Hernández <leohdz172@protonmail.com>
Date: Thu, 16 Jun 2022 15:54:13 -0500
Subject: move ugglyness to client.h

---
 dwl.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

(limited to 'dwl.c')

diff --git a/dwl.c b/dwl.c
index d5bd989..04ba50f 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1129,6 +1129,7 @@ focusclient(Client *c, int lift)
 		wl_list_insert(&fstack, &c->flink);
 		selmon = c->mon;
 		c->isurgent = 0;
+		client_restack_surface(c);
 
 		for (i = 0; i < 4; i++)
 			wlr_scene_rect_set_color(c->border[i], focuscolor);
@@ -1169,15 +1170,6 @@ focusclient(Client *c, int lift)
 		return;
 	}
 
-#ifdef XWAYLAND
-	/* This resolves an issue where the last spawned xwayland client
-	 * receives all pointer activity.
-	 */
-	if (c->type == X11Managed)
-		wlr_xwayland_surface_restack(c->surface.xwayland, NULL,
-				XCB_STACK_MODE_ABOVE);
-#endif
-
 	/* Have a client, so focus its top-level wlr_surface */
 	kb = wlr_seat_get_keyboard(seat);
 	if (kb)
-- 
cgit v1.2.3