Map input to the selected output

input-output-mapping
Andri Yngvason 2020-02-05 22:33:16 +00:00
parent 908ba0f904
commit 5dc5c700f8
2 changed files with 16 additions and 5 deletions

View File

@ -118,7 +118,7 @@
</request> </request>
</interface> </interface>
<interface name="zwlr_virtual_pointer_manager_v1" version="1"> <interface name="zwlr_virtual_pointer_manager_v1" version="2">
<description summary="virtual pointer manager"> <description summary="virtual pointer manager">
This object allows clients to create individual virtual pointer objects. This object allows clients to create individual virtual pointer objects.
</description> </description>
@ -131,9 +131,19 @@
<arg name="seat" type="object" interface="wl_seat" allow-null="true"/> <arg name="seat" type="object" interface="wl_seat" allow-null="true"/>
<arg name="id" type="new_id" interface="zwlr_virtual_pointer_v1"/> <arg name="id" type="new_id" interface="zwlr_virtual_pointer_v1"/>
</request> </request>
<request name="destroy" type="destructor" since="1"> <request name="destroy" type="destructor" since="1">
<description summary="destroy the virtual pointer manager"/> <description summary="destroy the virtual pointer manager"/>
</request> </request>
<request name="create_virtual_pointer2" since="2">
<description summary="Create a new virtual pointer">
Creates a new virtual pointer. The seat and the output arguments are
optional. If they are set, the compositor must bind the pointer
accordingly.
</description>
<arg name="seat" type="object" interface="wl_seat" allow-null="true"/>
<arg name="output" type="object" interface="wl_output" allow-null="true"/>
<arg name="id" type="new_id" interface="zwlr_virtual_pointer_v1"/>
</request>
</interface> </interface>
</protocol> </protocol>

View File

@ -163,7 +163,7 @@ static void registry_add(void* data, struct wl_registry* registry,
self->pointer_manager = self->pointer_manager =
wl_registry_bind(registry, id, wl_registry_bind(registry, id,
&zwlr_virtual_pointer_manager_v1_interface, &zwlr_virtual_pointer_manager_v1_interface,
1); 2);
return; return;
} }
@ -760,8 +760,9 @@ int main(int argc, char* argv[])
self.pointer_backend.output = self.selected_output; self.pointer_backend.output = self.selected_output;
self.pointer_backend.pointer = self.pointer_backend.pointer =
zwlr_virtual_pointer_manager_v1_create_virtual_pointer( zwlr_virtual_pointer_manager_v1_create_virtual_pointer2(
self.pointer_manager, self.selected_seat->wl_seat); self.pointer_manager, self.selected_seat->wl_seat,
out->wl_output);
pointer_init(&self.pointer_backend); pointer_init(&self.pointer_backend);