sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 798fc240812cc7136a7f2f755e68194884f5dbc4
parent 484f7677b0d5e07eb0e42d70343c4951ac6f24cf
Author: Some Chinese Guy <freemancrowbar100500@gmail.com>
Date:   Mon, 23 Mar 2020 12:18:50 +0300

Added focus following for touch_down

Diffstat:
Msway/input/cursor.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/sway/input/cursor.c b/sway/input/cursor.c @@ -368,6 +368,12 @@ static void handle_touch_down(struct wl_listener *listener, void *data) { event->touch_id, sx, sy); cursor_hide(cursor); } + + //move cursor so focus follows touch + float delta_x = lx - cursor->cursor->x; + float delta_y = ly - cursor->cursor->y; + cursor_motion(cursor, 0, event->device, delta_x, + delta_y, delta_x, delta_y); } static void handle_touch_up(struct wl_listener *listener, void *data) {