From e812f7a1f15272fa2fad1451b32b36404a9f6db2 Mon Sep 17 00:00:00 2001 From: mWalrus Date: Mon, 19 May 2025 13:25:17 +0200 Subject: [PATCH] fix: unfocus client on cursor leave moving the cursor off a client surface now unfocuses the client no matter if the cursor has moved to another surface or not. --- dwl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dwl.c b/dwl.c index 4816159..a1f19d0 100644 --- a/dwl.c +++ b/dwl.c @@ -1928,8 +1928,10 @@ motionnotify(uint32_t time, struct wlr_input_device *device, double dx, double d /* If there's no client surface under the cursor, set the cursor image to a * default. This is what makes the cursor image appear when you move it * off of a client or over its border. */ - if (!surface && !seat->drag) + if (!surface && !seat->drag) { wlr_cursor_set_xcursor(cursor, cursor_mgr, "default"); + focusclient(NULL, 0); + } pointerfocus(c, surface, sx, sy, time); }