From c07400af5fb464ceebf25f1ebb070239950f3914 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Tue, 7 May 2024 19:14:32 +0200 Subject: [PATCH] feat: focus empty monitor when clicked --- dwl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dwl.c b/dwl.c index bf763df..ff3e6f0 100644 --- a/dwl.c +++ b/dwl.c @@ -595,6 +595,8 @@ buttonpress(struct wl_listener *listener, void *data) xytonode(cursor->x, cursor->y, NULL, &c, NULL, NULL, NULL); if (c && (!client_is_unmanaged(c) || client_wants_focus(c))) focusclient(c, 1); + else if (!c) /* Change monitor if the button was _pressed_ over an empty space */ + selmon = xytomon(cursor->x, cursor->y); keyboard = wlr_seat_get_keyboard(seat); mods = keyboard ? wlr_keyboard_get_modifiers(keyboard) : 0; -- 2.48.1