mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 00:50:42 -05:00
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 (backported from master for https://bugzilla.gnome.org/show_bug.cgi?id=775635)
This commit is contained in:
parent
58669e7598
commit
917aef5090
@ -744,7 +744,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
|
||||
@ -792,6 +794,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;
|
||||
|
||||
@ -825,7 +829,9 @@ update_tablet_mapping (MetaInputSettings *input_settings,
|
||||
GDesktopTabletMapping mapping;
|
||||
DeviceMappingInfo *info;
|
||||
|
||||
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
|
||||
@ -866,7 +872,9 @@ update_tablet_area (MetaInputSettings *input_settings,
|
||||
const guint32 *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
|
||||
@ -905,7 +913,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
|
||||
|
Loading…
Reference in New Issue
Block a user