From 213187bbf419e847c50d49d0d1299935cbcd087f Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Fri, 24 Jun 2022 11:10:18 -0400 Subject: suggpicker: Allow changing mind about which one you want to pick --- main.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index cf2ed9f..8dd7810 100644 --- a/main.c +++ b/main.c @@ -147,12 +147,7 @@ wl_touch_down(void *data, struct wl_touch *wl_touch, uint32_t serial, touch_x = wl_fixed_to_int(x); touch_y = wl_fixed_to_int(y); - kbd_unpress_key(&keyboard); - - next_key = kbd_get_key(&keyboard, touch_x, touch_y); - if (next_key) { - kbd_press_key(&keyboard, next_key); - } + kbd_motion_key(&keyboard, touch_x, touch_y); } void @@ -221,10 +216,7 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer, uint32_t serial, } if (cur_press && cur_x >= 0 && cur_y >= 0) { - next_key = kbd_get_key(&keyboard, cur_x, cur_y); - if (next_key) { - kbd_press_key(&keyboard, next_key); - } + kbd_motion_key(&keyboard, cur_x, cur_y); } } -- cgit 1.4.1