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