Set pointer pos before focusing view under it

This commit is contained in:
Mikkel Oscar Lyderik 2016-02-27 13:18:55 +01:00
parent e19e32cf81
commit 5ff3fb1c04

View file

@ -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.x = new_origin->x - origin.x;
pointer_state.delta.y = new_origin->y - origin.y; pointer_state.delta.y = new_origin->y - origin.y;
wlc_pointer_set_position(new_origin);
// Update view under pointer // Update view under pointer
swayc_t *prev_view = pointer_state.view; swayc_t *prev_view = pointer_state.view;
pointer_state.view = container_under_pointer(); 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); set_focused_container(pointer_state.view);
} }
} }
wlc_pointer_set_position(new_origin);
} }
void center_pointer_on(swayc_t *view) { void center_pointer_on(swayc_t *view) {