diff options
author | emersion <contact@emersion.fr> | 2018-04-21 12:46:48 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-04-21 12:46:48 +0100 |
commit | 33ed279494e7f95d74d494523afe8949091da8cd (patch) | |
tree | 9fae75ffb8943c72eabb2f17ea96b4ac6826c6bb /sway | |
parent | 8e32c4a1fb287d1a3675f3359891d909dc2b9456 (diff) |
Update cursor when workspace focus changes
Diffstat (limited to 'sway')
-rw-r--r-- | sway/input/cursor.c | 5 | ||||
-rw-r--r-- | sway/input/seat.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index a19f0752..5ed4f1f7 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c @@ -59,9 +59,8 @@ static struct sway_container *container_at_cursor(struct sway_cursor *cursor, // find the output the cursor is on struct wlr_output_layout *output_layout = root_container.sway_root->output_layout; - struct wlr_output *wlr_output = - wlr_output_layout_output_at(output_layout, - cursor->cursor->x, cursor->cursor->y); + struct wlr_output *wlr_output = wlr_output_layout_output_at(output_layout, + cursor->cursor->x, cursor->cursor->y); if (wlr_output == NULL) { return NULL; } diff --git a/sway/input/seat.c b/sway/input/seat.c index 8bba7d8f..631a273f 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -564,6 +564,12 @@ void seat_set_focus_warp(struct sway_seat *seat, view_set_activated(view, false); } + if (last_workspace && last_workspace != new_workspace) { + struct timespec now; + clock_gettime(CLOCK_MONOTONIC, &now); + cursor_send_pointer_motion(seat->cursor, now.tv_nsec / 1000); + } + seat->has_focus = (container != NULL); update_debug_tree(); |