[mutter] backends: Add envvar to disable wacom configuration
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] backends: Add envvar to disable wacom configuration
- Date: Tue, 3 Oct 2017 23:06:02 +0000 (UTC)
commit 9000eef49dba1462fc67c89a4b731985cf3eda7f
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Oct 4 00:42:39 2017 +0200
backends: Add envvar to disable wacom configuration
People that relied on xsetwacom to configure their tablets used to get
away with this by disabling the wacom g-s-d plugin prior to running
their scripts. This is not possible anymore with mutter managing device
configuration.
Given that X11 shall not go away soon and there's a core of stubbornly
accustomed users, provide a MUTTER_DISABLE_WACOM_CONFIGURATION envvar
to provide *some* way to do this.
src/backends/meta-input-settings.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/src/backends/meta-input-settings.c b/src/backends/meta-input-settings.c
index 8130bf5..d6c7b57 100644
--- a/src/backends/meta-input-settings.c
+++ b/src/backends/meta-input-settings.c
@@ -1308,8 +1308,18 @@ check_add_mappable_device (MetaInputSettings *input_settings,
{
MetaInputSettingsPrivate *priv;
DeviceMappingInfo *info;
+ ClutterInputDeviceType device_type;
GSettings *settings;
+ device_type = clutter_input_device_get_device_type (device);
+
+ if ((device_type == CLUTTER_TABLET_DEVICE ||
+ device_type == CLUTTER_PEN_DEVICE ||
+ device_type == CLUTTER_ERASER_DEVICE ||
+ device_type == CLUTTER_PAD_DEVICE) &&
+ g_getenv ("MUTTER_DISABLE_WACOM_CONFIGURATION") != NULL)
+ return FALSE;
+
settings = lookup_device_settings (device);
if (!settings)
@@ -1323,8 +1333,8 @@ check_add_mappable_device (MetaInputSettings *input_settings,
info->settings = settings;
#ifdef HAVE_LIBWACOM
- if (clutter_input_device_get_device_type (device) == CLUTTER_TABLET_DEVICE ||
- clutter_input_device_get_device_type (device) == CLUTTER_PAD_DEVICE)
+ if (device_type == CLUTTER_TABLET_DEVICE ||
+ device_type == CLUTTER_PAD_DEVICE)
{
WacomError *error = libwacom_error_new ();
@@ -1342,7 +1352,7 @@ check_add_mappable_device (MetaInputSettings *input_settings,
}
#endif
- if (clutter_input_device_get_device_type (device) == CLUTTER_PAD_DEVICE)
+ if (device_type == CLUTTER_PAD_DEVICE)
{
info->group_modes =
g_new0 (guint, clutter_input_device_get_n_mode_groups (device));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]