diff options
author | William Wold <[email protected]> | 2018-09-09 22:47:58 -0700 |
---|---|---|
committer | William Wold <[email protected]> | 2018-09-10 10:18:12 -0700 |
commit | e787a1581cc399ca7d953c9cd4d868499f5733a3 (patch) | |
tree | 3f14ab74cc6684867cdf41de76e0b833ad86783f /sway/tree/view.c | |
parent | 024b9d85ea4cd51d803317c64e46dac659c9f7ec (diff) |
Give windows pointer focus immediately when they are switched to
Fixes #2401 (aka #2558)
Previously, when switching windows, pointer focus was not changed until the pointer was moved. This makes the pointer enter happen immediately, without the side effects of other attempted fixes.
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r-- | sway/tree/view.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index 53215b40..10c48e2e 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -14,6 +14,7 @@ #include "sway/criteria.h" #include "sway/commands.h" #include "sway/desktop/transaction.h" +#include "sway/input/cursor.h" #include "sway/ipc-server.h" #include "sway/output.h" #include "sway/input/seat.h" @@ -583,6 +584,7 @@ void view_unmap(struct sway_view *view) { } transaction_commit_dirty(); + cursor_send_pointer_motion(config->handler_context.seat->cursor, 0, true); view->surface = NULL; } |