mirror of
https://github.com/brl/mutter.git
synced 2025-02-16 21:34:09 +00:00
backends: Notify tablet mapping changes in the UI
This takes over the older code in g-s-d. https://bugzilla.gnome.org/show_bug.cgi?id=771098
This commit is contained in:
parent
efd9d467f2
commit
ff453c1143
@ -1559,7 +1559,7 @@ meta_input_settings_cycle_tablet_output (MetaInputSettings *input_settings,
|
|||||||
MetaInputSettingsPrivate *priv;
|
MetaInputSettingsPrivate *priv;
|
||||||
DeviceMappingInfo *info;
|
DeviceMappingInfo *info;
|
||||||
MetaOutput *output;
|
MetaOutput *output;
|
||||||
const gchar *edid[4] = { 0 };
|
const gchar *edid[4] = { 0 }, *pretty_name = NULL;
|
||||||
|
|
||||||
g_return_if_fail (META_IS_INPUT_SETTINGS (input_settings));
|
g_return_if_fail (META_IS_INPUT_SETTINGS (input_settings));
|
||||||
g_return_if_fail (CLUTTER_IS_INPUT_DEVICE (device));
|
g_return_if_fail (CLUTTER_IS_INPUT_DEVICE (device));
|
||||||
@ -1571,10 +1571,14 @@ meta_input_settings_cycle_tablet_output (MetaInputSettings *input_settings,
|
|||||||
g_return_if_fail (info != NULL);
|
g_return_if_fail (info != NULL);
|
||||||
|
|
||||||
#ifdef HAVE_LIBWACOM
|
#ifdef HAVE_LIBWACOM
|
||||||
/* Output rotation only makes sense on external tablets */
|
if (info->wacom_device)
|
||||||
if (info->wacom_device &&
|
{
|
||||||
(libwacom_get_integration_flags (info->wacom_device) != WACOM_DEVICE_INTEGRATED_NONE))
|
/* Output rotation only makes sense on external tablets */
|
||||||
return;
|
if (libwacom_get_integration_flags (info->wacom_device) != WACOM_DEVICE_INTEGRATED_NONE)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pretty_name = libwacom_get_name (info->wacom_device);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
output = meta_input_settings_find_output (input_settings,
|
output = meta_input_settings_find_output (input_settings,
|
||||||
@ -1586,6 +1590,9 @@ meta_input_settings_cycle_tablet_output (MetaInputSettings *input_settings,
|
|||||||
edid[1] = output ? output->product : "";
|
edid[1] = output ? output->product : "";
|
||||||
edid[2] = output ? output->serial : "";
|
edid[2] = output ? output->serial : "";
|
||||||
g_settings_set_strv (info->settings, "display", edid);
|
g_settings_set_strv (info->settings, "display", edid);
|
||||||
|
|
||||||
|
meta_display_show_tablet_mapping_notification (meta_get_display (),
|
||||||
|
device, pretty_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user