diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2020-02-05 22:08:11 +0000 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2020-02-05 22:08:11 +0000 |
| commit | 2ba97a7ad454593c35ea965b23b817240cf74dd4 (patch) | |
| tree | 0fcde987bde54284a26cce5696d4ecc4c38b7d95 | |
| parent | 3f5487e0676c5e208a10b6ea63af9fb9a4a699f5 (diff) | |
input: Map virtual-pointer to the requested output
| -rw-r--r-- | sway/input/input-manager.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c index 592e6f45..4cc07fe6 100644 --- a/sway/input/input-manager.c +++ b/sway/input/input-manager.c @@ -7,10 +7,12 @@ #include <wlr/types/wlr_input_inhibitor.h> #include <wlr/types/wlr_virtual_keyboard_v1.h> #include <wlr/types/wlr_virtual_pointer_v1.h> +#include <wlr/types/wlr_cursor.h> #include "sway/config.h" #include "sway/input/input-manager.h" #include "sway/input/libinput.h" #include "sway/input/seat.h" +#include "sway/input/cursor.h" #include "sway/ipc-server.h" #include "sway/server.h" #include "stringop.h" @@ -354,6 +356,11 @@ void handle_virtual_pointer(struct wl_listener *listener, void *data) { input_device->device_destroy.notify = handle_device_destroy; seat_add_device(seat, input_device); + + if (event->suggested_output) { + wlr_cursor_map_input_to_output(seat->cursor->cursor, device, + event->suggested_output); + } } struct sway_input_manager *input_manager_create(struct sway_server *server) { |
