[gnome-boxes/add-tablet-only-if-supported] vm-configurator: Only add USB Tablet if supported
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/add-tablet-only-if-supported] vm-configurator: Only add USB Tablet if supported
- Date: Tue, 4 Dec 2018 14:13:28 +0000 (UTC)
commit 836f3888746c668f37d51504011c7b5aed4381aa
Author: Felipe Borges <felipeborges gnome org>
Date: Tue Dec 4 15:11:45 2018 +0100
vm-configurator: Only add USB Tablet if supported
We can rely on libosinfo to verify whether a given operating
system supports a "tablet" device.
Fixes #49
src/vm-configurator.vala | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala
index 9e8e24ef..53e5c9fd 100644
--- a/src/vm-configurator.vala
+++ b/src/vm-configurator.vala
@@ -417,7 +417,10 @@ private static void set_sound_config (Domain domain, InstallerMedia install_medi
}
private static void set_tablet_config (Domain domain, InstallerMedia install_media) {
- set_input_config (domain, DomainInputDeviceType.TABLET);
+ var device = find_device_by_prop (install_media.supported_devices, DEVICE_PROP_CLASS, "tablet");
+ if (device != null) {
+ set_input_config (domain, DomainInputDeviceType.TABLET);
+ }
}
private static void set_mouse_config (Domain domain, InstallerMedia install_media) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]