[mutter/wip/tablet-protocol-v2: 61/65] backends: Export function to query the mapped MetaOutput of a tablet
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/tablet-protocol-v2: 61/65] backends: Export function to query the mapped MetaOutput of a tablet
- Date: Wed, 29 Jun 2016 12:25:27 +0000 (UTC)
commit 795b824c73cbd641e262ffcf7394caf4447ec3a7
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Jun 29 13:50:20 2016 +0200
backends: Export function to query the mapped MetaOutput of a tablet
Or NULL if the tablet is mapped to the full desktop size.
src/backends/meta-input-settings-private.h | 3 +++
src/backends/meta-input-settings.c | 18 ++++++++++++++++++
2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/meta-input-settings-private.h b/src/backends/meta-input-settings-private.h
index bc15860..c31c522 100644
--- a/src/backends/meta-input-settings-private.h
+++ b/src/backends/meta-input-settings-private.h
@@ -105,6 +105,9 @@ MetaInputSettings * meta_input_settings_get (void);
GSettings * meta_input_settings_get_tablet_settings (MetaInputSettings *settings,
ClutterInputDevice *device);
+MetaOutput * meta_input_settings_get_tablet_output (MetaInputSettings *settings,
+ ClutterInputDevice *device);
+
GDesktopTabletMapping meta_input_settings_get_tablet_mapping (MetaInputSettings *settings,
ClutterInputDevice *device);
diff --git a/src/backends/meta-input-settings.c b/src/backends/meta-input-settings.c
index b626416..38f1566 100644
--- a/src/backends/meta-input-settings.c
+++ b/src/backends/meta-input-settings.c
@@ -1219,6 +1219,24 @@ meta_input_settings_get_tablet_settings (MetaInputSettings *settings,
return info ? g_object_ref (info->settings) : NULL;
}
+MetaOutput *
+meta_input_settings_get_tablet_output (MetaInputSettings *settings,
+ ClutterInputDevice *device)
+{
+ MetaInputSettingsPrivate *priv;
+ DeviceMappingInfo *info;
+
+ g_return_val_if_fail (META_IS_INPUT_SETTINGS (settings), NULL);
+ g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), NULL);
+
+ priv = meta_input_settings_get_instance_private (settings);
+ info = g_hash_table_lookup (priv->mappable_devices, device);
+ if (!info)
+ return NULL;
+
+ return meta_input_settings_find_output (settings, info->settings, device);
+}
+
GDesktopTabletMapping
meta_input_settings_get_tablet_mapping (MetaInputSettings *settings,
ClutterInputDevice *device)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]