input: Mark virtual devices as such

This is for internal configuration purposes
This commit is contained in:
Andri Yngvason 2020-04-10 21:10:49 +00:00 committed by Simon Ser
parent a1275055ea
commit 46599df0a2
2 changed files with 3 additions and 0 deletions

View File

@ -14,6 +14,7 @@ struct sway_input_device {
struct wlr_input_device *wlr_device;
struct wl_list link;
struct wl_listener device_destroy;
bool is_virtual;
};
struct sway_input_manager {

View File

@ -374,6 +374,7 @@ void handle_virtual_keyboard(struct wl_listener *listener, void *data) {
}
device->data = input_device;
input_device->is_virtual = true;
input_device->wlr_device = device;
input_device->identifier = input_device_get_identifier(device);
wl_list_insert(&input_manager->devices, &input_device->link);
@ -405,6 +406,7 @@ void handle_virtual_pointer(struct wl_listener *listener, void *data) {
}
device->data = input_device;
input_device->is_virtual = true;
input_device->wlr_device = device;
input_device->identifier = input_device_get_identifier(device);
wl_list_insert(&input_manager->devices, &input_device->link);