spkp

Stacking wayland compositor
git clone git://git.z3bra.org/spkp.git
Log | Files | Refs

commit 6ab5e13d8e42ac4c6490936970e6ec4085fab45a
parent a8b09a56046536686e6a00db338d02e08d5fb05d
Author: Willy Goiffon <dev@z3bra.org>
Date:   Sun, 15 Nov 2020 22:37:07 +0100

Give focus to the window clicked

Diffstat:
Msp:kp.c | 13+++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/sp:kp.c b/sp:kp.c @@ -768,12 +768,6 @@ cb_click_press(struct state *server, struct wlr_event_pointer_button *ev) kb = wlr_seat_get_keyboard(server->seat); - if (kb->modifiers.depressed != mousemod) { - wlr_seat_pointer_notify_button(server->seat, - ev->time_msec, ev->button, ev->state); - return; - } - w = underneath(server, server->cursor->x, server->cursor->y); /* pass down event when not grabbing a window */ @@ -795,6 +789,13 @@ cb_click_press(struct state *server, struct wlr_event_pointer_button *ev) focus(w); } + if (kb->modifiers.depressed != mousemod) { + wlr_seat_pointer_notify_button(server->seat, + ev->time_msec, ev->button, ev->state); + + return; + } + switch (ev->button) { case BTN_MIDDLE: server->grabmode = TELEPORT;