commit 3c7fd145d5223b06c05660d05f51b91dc41c81cf
parent bdb176863c3c45caae70abb909f9eca9f611e78f
Author: Ryan Dwyer <ryandwyer1@gmail.com>
Date: Wed, 24 Oct 2018 18:43:32 +1000
Rebase the cursor after focusing in a direction
Prior to this patch, creating a tabbed container with two views,
switching tab and then scrolling without motion would cause the scroll
events to be sent to the old focus. To fix this, rebasing the cursor is
needed after changing focus.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/sway/commands/focus.c b/sway/commands/focus.c
@@ -294,6 +294,7 @@ struct cmd_results *cmd_focus(int argc, char **argv) {
if (next_focus) {
seat_set_focus(seat, next_focus);
seat_consider_warp_to_focus(seat);
+ cursor_rebase(seat->cursor);
}
return cmd_results_new(CMD_SUCCESS, NULL, NULL);