From 5dc5c700f897ff542982b1655362941a606c2087 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Wed, 5 Feb 2020 22:33:16 +0000 Subject: [PATCH] Map input to the selected output --- protocols/wlr-virtual-pointer-unstable-v1.xml | 14 ++++++++++++-- src/main.c | 7 ++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/protocols/wlr-virtual-pointer-unstable-v1.xml b/protocols/wlr-virtual-pointer-unstable-v1.xml index e21b4d7..a9fadfc 100644 --- a/protocols/wlr-virtual-pointer-unstable-v1.xml +++ b/protocols/wlr-virtual-pointer-unstable-v1.xml @@ -118,7 +118,7 @@ - + This object allows clients to create individual virtual pointer objects. @@ -131,9 +131,19 @@ - + + + + Creates a new virtual pointer. The seat and the output arguments are + optional. If they are set, the compositor must bind the pointer + accordingly. + + + + + diff --git a/src/main.c b/src/main.c index 06ce7aa..11e6629 100644 --- a/src/main.c +++ b/src/main.c @@ -163,7 +163,7 @@ static void registry_add(void* data, struct wl_registry* registry, self->pointer_manager = wl_registry_bind(registry, id, &zwlr_virtual_pointer_manager_v1_interface, - 1); + 2); return; } @@ -760,8 +760,9 @@ int main(int argc, char* argv[]) self.pointer_backend.output = self.selected_output; self.pointer_backend.pointer = - zwlr_virtual_pointer_manager_v1_create_virtual_pointer( - self.pointer_manager, self.selected_seat->wl_seat); + zwlr_virtual_pointer_manager_v1_create_virtual_pointer2( + self.pointer_manager, self.selected_seat->wl_seat, + out->wl_output); pointer_init(&self.pointer_backend);