backends: Add support for Wacom stylus tertiary-button-action

The tertiary-button-action (see bug 790028) is a place for g-c-c to store
the action which should be performed when a stylus' third button is pressed.
Pressing this button is signaled as a BTN_STYLUS3 event from the kernel or
X11 button 8.

https://bugzilla.gnome.org/show_bug.cgi?id=790033
This commit is contained in:
Jason Gerecke
2017-10-10 08:55:41 -07:00
committed by Carlos Garnacho
parent 91df801ffb
commit f8f1bcfa9e
4 changed files with 17 additions and 6 deletions

View File

@ -1525,7 +1525,7 @@ update_stylus_buttonmap (MetaInputSettings *input_settings,
ClutterInputDeviceTool *tool)
{
MetaInputSettingsClass *input_settings_class;
GDesktopStylusButtonAction primary, secondary;
GDesktopStylusButtonAction primary, secondary, tertiary;
GSettings *tool_settings;
if (clutter_input_device_get_device_type (device) != CLUTTER_TABLET_DEVICE &&
@ -1540,10 +1540,11 @@ update_stylus_buttonmap (MetaInputSettings *input_settings,
primary = g_settings_get_enum (tool_settings, "button-action");
secondary = g_settings_get_enum (tool_settings, "secondary-button-action");
tertiary = g_settings_get_enum (tool_settings, "tertiary-button-action");
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
input_settings_class->set_stylus_button_map (input_settings, device, tool,
primary, secondary);
primary, secondary, tertiary);
}
static void