Fix cursor motion issues

Use only one canonical cursor x/y position and send cursor enter when
mouse is warped.

Tangentally related to #1714
This commit is contained in:
Drew DeVault 2018-04-08 12:42:56 -04:00
parent ebabcc8b44
commit 9c5a88a7bd
3 changed files with 12 additions and 21 deletions

View file

@ -434,6 +434,9 @@ void seat_set_focus_warp(struct sway_seat *seat,
wlr_output, seat->cursor->cursor->x,
seat->cursor->cursor->y)) {
wlr_cursor_warp(seat->cursor->cursor, NULL, x, y);
struct timespec now;
clock_gettime(CLOCK_MONOTONIC, &now);
cursor_send_pointer_motion(seat->cursor, now.tv_nsec / 1000);
}
}
}