From 803e89018ab899a44e1ca24758d981dff27d5986 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Wed, 5 Feb 2020 22:08:11 +0000 Subject: input: Map virtual-pointer to the requested output --- sway/input/input-manager.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sway/input/input-manager.c') 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 #include #include +#include #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) { -- cgit v1.2.3-54-g00ecf