From 5ff3fb1c0472d974f74c0329a10895cc76c83a55 Mon Sep 17 00:00:00 2001 From: Mikkel Oscar Lyderik Date: Sat, 27 Feb 2016 13:18:55 +0100 Subject: [PATCH] Set pointer pos before focusing view under it --- sway/input_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sway/input_state.c b/sway/input_state.c index 41ec5712..cb71673e 100644 --- a/sway/input_state.c +++ b/sway/input_state.c @@ -209,6 +209,8 @@ void pointer_position_set(struct wlc_point *new_origin, bool force_focus) { pointer_state.delta.x = new_origin->x - origin.x; pointer_state.delta.y = new_origin->y - origin.y; + wlc_pointer_set_position(new_origin); + // Update view under pointer swayc_t *prev_view = pointer_state.view; pointer_state.view = container_under_pointer(); @@ -222,8 +224,6 @@ void pointer_position_set(struct wlc_point *new_origin, bool force_focus) { set_focused_container(pointer_state.view); } } - - wlc_pointer_set_position(new_origin); } void center_pointer_on(swayc_t *view) {