mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
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.
This commit is contained in:
parent
e198c8452b
commit
9000eef49d
@ -1308,8 +1308,18 @@ check_add_mappable_device (MetaInputSettings *input_settings,
|
|||||||
{
|
{
|
||||||
MetaInputSettingsPrivate *priv;
|
MetaInputSettingsPrivate *priv;
|
||||||
DeviceMappingInfo *info;
|
DeviceMappingInfo *info;
|
||||||
|
ClutterInputDeviceType device_type;
|
||||||
GSettings *settings;
|
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);
|
settings = lookup_device_settings (device);
|
||||||
|
|
||||||
if (!settings)
|
if (!settings)
|
||||||
@ -1323,8 +1333,8 @@ check_add_mappable_device (MetaInputSettings *input_settings,
|
|||||||
info->settings = settings;
|
info->settings = settings;
|
||||||
|
|
||||||
#ifdef HAVE_LIBWACOM
|
#ifdef HAVE_LIBWACOM
|
||||||
if (clutter_input_device_get_device_type (device) == CLUTTER_TABLET_DEVICE ||
|
if (device_type == CLUTTER_TABLET_DEVICE ||
|
||||||
clutter_input_device_get_device_type (device) == CLUTTER_PAD_DEVICE)
|
device_type == CLUTTER_PAD_DEVICE)
|
||||||
{
|
{
|
||||||
WacomError *error = libwacom_error_new ();
|
WacomError *error = libwacom_error_new ();
|
||||||
|
|
||||||
@ -1342,7 +1352,7 @@ check_add_mappable_device (MetaInputSettings *input_settings,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (clutter_input_device_get_device_type (device) == CLUTTER_PAD_DEVICE)
|
if (device_type == CLUTTER_PAD_DEVICE)
|
||||||
{
|
{
|
||||||
info->group_modes =
|
info->group_modes =
|
||||||
g_new0 (guint, clutter_input_device_get_n_mode_groups (device));
|
g_new0 (guint, clutter_input_device_get_n_mode_groups (device));
|
||||||
|
Loading…
Reference in New Issue
Block a user