[mutter] backends: extend tablet device checks
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] backends: extend tablet device checks
- Date: Fri, 4 Nov 2016 20:38:54 +0000 (UTC)
commit b35b531f002f315c116ee795213aaf72d0eb59fe
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Oct 31 17:57:01 2016 +0100
backends: extend tablet device checks
The Clutter X11 backend can't drop CLUTTER_PEN_DEVICE and
CLUTTER_ERASER_DEVICE in favor of CLUTTER_TABLET_DEVICE without
losing information (as the driver will create one device for each).
So make MetaInputSettings cater for both sets of device types.
https://bugzilla.gnome.org/show_bug.cgi?id=773779
src/backends/meta-input-settings.c | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/src/backends/meta-input-settings.c b/src/backends/meta-input-settings.c
index 36abc7e..0d6a7b1 100644
--- a/src/backends/meta-input-settings.c
+++ b/src/backends/meta-input-settings.c
@@ -724,7 +724,9 @@ update_tablet_keep_aspect (MetaInputSettings *input_settings,
MetaOutput *output = NULL;
gboolean keep_aspect;
- if (clutter_input_device_get_device_type (device) != CLUTTER_TABLET_DEVICE)
+ if (clutter_input_device_get_device_type (device) != CLUTTER_TABLET_DEVICE &&
+ clutter_input_device_get_device_type (device) != CLUTTER_PEN_DEVICE &&
+ clutter_input_device_get_device_type (device) != CLUTTER_ERASER_DEVICE)
return;
#ifdef HAVE_LIBWACOM
@@ -768,6 +770,8 @@ update_device_display (MetaInputSettings *input_settings,
MetaOutput *output;
if (clutter_input_device_get_device_type (device) != CLUTTER_TABLET_DEVICE &&
+ clutter_input_device_get_device_type (device) != CLUTTER_PEN_DEVICE &&
+ clutter_input_device_get_device_type (device) != CLUTTER_ERASER_DEVICE &&
clutter_input_device_get_device_type (device) != CLUTTER_TOUCHSCREEN_DEVICE)
return;
@@ -800,7 +804,9 @@ update_tablet_mapping (MetaInputSettings *input_settings,
MetaInputSettingsClass *input_settings_class;
GDesktopTabletMapping mapping;
- if (clutter_input_device_get_device_type (device) != CLUTTER_TABLET_DEVICE)
+ if (clutter_input_device_get_device_type (device) != CLUTTER_TABLET_DEVICE &&
+ clutter_input_device_get_device_type (device) != CLUTTER_PEN_DEVICE &&
+ clutter_input_device_get_device_type (device) != CLUTTER_ERASER_DEVICE)
return;
#ifdef HAVE_LIBWACOM
@@ -838,7 +844,9 @@ update_tablet_area (MetaInputSettings *input_settings,
const gdouble *area;
gsize n_elems;
- if (clutter_input_device_get_device_type (device) != CLUTTER_TABLET_DEVICE)
+ if (clutter_input_device_get_device_type (device) != CLUTTER_TABLET_DEVICE &&
+ clutter_input_device_get_device_type (device) != CLUTTER_PEN_DEVICE &&
+ clutter_input_device_get_device_type (device) != CLUTTER_ERASER_DEVICE)
return;
#ifdef HAVE_LIBWACOM
@@ -877,7 +885,10 @@ update_tablet_left_handed (MetaInputSettings *input_settings,
MetaInputSettingsClass *input_settings_class;
gboolean enabled;
- if (clutter_input_device_get_device_type (device) != CLUTTER_TABLET_DEVICE)
+ if (clutter_input_device_get_device_type (device) != CLUTTER_TABLET_DEVICE &&
+ clutter_input_device_get_device_type (device) != CLUTTER_PEN_DEVICE &&
+ clutter_input_device_get_device_type (device) != CLUTTER_ERASER_DEVICE &&
+ clutter_input_device_get_device_type (device) != CLUTTER_PAD_DEVICE)
return;
#ifdef HAVE_LIBWACOM
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]