backends: Extend pad action label checks to rings/strips

This way the pad OSD can obtain the keycombos that are mapped to these
for labeling purposes.

https://bugzilla.gnome.org/show_bug.cgi?id=782033
This commit is contained in:
Carlos Garnacho
2017-07-05 13:35:31 +02:00
parent 5c3b27d02f
commit f852d2b0eb
3 changed files with 135 additions and 17 deletions

View File

@ -3162,18 +3162,14 @@ meta_display_get_pad_action_label (MetaDisplay *display,
MetaPadActionType action_type,
guint action_number)
{
MetaInputSettings *settings;
gchar *label;
/* First, lookup the action, as imposed by settings */
if (action_type == META_PAD_ACTION_BUTTON)
{
MetaInputSettings *settings;
settings = meta_backend_get_input_settings (meta_get_backend ());
label = meta_input_settings_get_pad_button_action_label (settings, pad, action_number);
if (label)
return label;
}
settings = meta_backend_get_input_settings (meta_get_backend ());
label = meta_input_settings_get_pad_action_label (settings, pad, action_type, action_number);
if (label)
return label;
#ifdef HAVE_WAYLAND
/* Second, if this wayland, lookup the actions set by the clients */