aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndri Yngvason <andri@yngvason.is>2020-04-10 21:10:49 +0000
committerSimon Ser <contact@emersion.fr>2020-04-14 12:07:24 +0200
commit46599df0a2260ddc77aa18a3173a1cd6c7d10c0b (patch)
treec152a74bfe2b7670c52488436fb47765f7e7765e
parenta1275055ea3cb3331ef6b420f94307c117ba2931 (diff)
input: Mark virtual devices as such
This is for internal configuration purposes
-rw-r--r--include/sway/input/input-manager.h1
-rw-r--r--sway/input/input-manager.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/include/sway/input/input-manager.h b/include/sway/input/input-manager.h
index 410d17a8..5107647d 100644
--- a/include/sway/input/input-manager.h
+++ b/include/sway/input/input-manager.h
@@ -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 {
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c
index 124d57dc..243f860b 100644
--- a/sway/input/input-manager.c
+++ b/sway/input/input-manager.c
@@ -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);