tGive focus to the window clicked - spkp - Stacking wayland compositor
 (HTM) git clone git://git.z3bra.org/spkp.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit 6ab5e13d8e42ac4c6490936970e6ec4085fab45a
 (DIR) parent a8b09a56046536686e6a00db338d02e08d5fb05d
 (HTM) Author: Willy Goiffon <dev@z3bra.org>
       Date:   Sun, 15 Nov 2020 22:37:07 +0100
       
       Give focus to the window clicked
       
       Diffstat:
         M sp:kp.c                             |      13 +++++++------
       
       1 file changed, 7 insertions(+), 6 deletions(-)
       ---
 (DIR) diff --git a/sp:kp.c b/sp:kp.c
       t@@ -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 */
       t@@ -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;