|
|
e82d74 |
From 38d88d4e4286c3ada041561426873e44fdba3c40 Mon Sep 17 00:00:00 2001
|
|
|
e82d74 |
From: Carlos Garnacho <carlosg@gnome.org>
|
|
|
e82d74 |
Date: Fri, 17 Jan 2020 14:45:00 +0100
|
|
|
e82d74 |
Subject: [PATCH] Create explicit WacomDevices for tablet "touchpad" devices
|
|
|
e82d74 |
|
|
|
e82d74 |
---
|
|
|
e82d74 |
src/backends/meta-input-settings.c | 15 +++++++++++----
|
|
|
e82d74 |
1 file changed, 11 insertions(+), 4 deletions(-)
|
|
|
e82d74 |
|
|
|
e82d74 |
diff --git a/src/backends/meta-input-settings.c b/src/backends/meta-input-settings.c
|
|
|
e82d74 |
index 28dc387ef9..820a3b201e 100644
|
|
|
e82d74 |
--- a/src/backends/meta-input-settings.c
|
|
|
e82d74 |
+++ b/src/backends/meta-input-settings.c
|
|
|
e82d74 |
@@ -521,27 +521,34 @@ static gboolean
|
|
|
e82d74 |
device_is_tablet_touchpad (MetaInputSettings *input_settings,
|
|
|
e82d74 |
ClutterInputDevice *device)
|
|
|
e82d74 |
{
|
|
|
e82d74 |
+ gboolean is_tablet = FALSE;
|
|
|
e82d74 |
#ifdef HAVE_LIBWACOM
|
|
|
e82d74 |
+ MetaInputSettingsPrivate *priv;
|
|
|
e82d74 |
WacomIntegrationFlags flags = 0;
|
|
|
e82d74 |
WacomDevice *wacom_device;
|
|
|
e82d74 |
|
|
|
e82d74 |
+ priv = meta_input_settings_get_instance_private (input_settings);
|
|
|
e82d74 |
+
|
|
|
e82d74 |
if (clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE)
|
|
|
e82d74 |
return FALSE;
|
|
|
e82d74 |
|
|
|
e82d74 |
wacom_device =
|
|
|
e82d74 |
- meta_input_settings_get_tablet_wacom_device (input_settings,
|
|
|
e82d74 |
- device);
|
|
|
e82d74 |
+ libwacom_new_from_path (priv->wacom_db,
|
|
|
e82d74 |
+ clutter_input_device_get_device_node (device),
|
|
|
e82d74 |
+ WFALLBACK_NONE, NULL);
|
|
|
e82d74 |
if (wacom_device)
|
|
|
e82d74 |
{
|
|
|
e82d74 |
flags = libwacom_get_integration_flags (wacom_device);
|
|
|
e82d74 |
|
|
|
e82d74 |
if ((flags & (WACOM_DEVICE_INTEGRATED_SYSTEM |
|
|
|
e82d74 |
WACOM_DEVICE_INTEGRATED_DISPLAY)) == 0)
|
|
|
e82d74 |
- return TRUE;
|
|
|
e82d74 |
+ is_tablet = TRUE;
|
|
|
e82d74 |
+
|
|
|
e82d74 |
+ libwacom_destroy (wacom_device);
|
|
|
e82d74 |
}
|
|
|
e82d74 |
#endif
|
|
|
e82d74 |
|
|
|
e82d74 |
- return FALSE;
|
|
|
e82d74 |
+ return is_tablet;
|
|
|
e82d74 |
}
|
|
|
e82d74 |
|
|
|
e82d74 |
static void
|
|
|
e82d74 |
--
|
|
|
e82d74 |
2.25.0.rc2
|
|
|
e82d74 |
|