[mutter] monitor-manager: Add a handle_orientation_change helper function
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] monitor-manager: Add a handle_orientation_change helper function
- Date: Mon, 19 Oct 2020 07:50:39 +0000 (UTC)
commit 4c1220836331b9442a54ff0ec9dfa5ab55ed91e3
Author: Hans de Goede <hdegoede redhat com>
Date: Thu Oct 15 12:21:05 2020 +0200
monitor-manager: Add a handle_orientation_change helper function
Move the bulk of orientation_changed to a new handle_orientation_change
helper function. This is a preparation patch for further orientation
handling related changes.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1506
src/backends/meta-monitor-manager.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c
index 1c6d37c303..18aeddcd9c 100644
--- a/src/backends/meta-monitor-manager.c
+++ b/src/backends/meta-monitor-manager.c
@@ -678,16 +678,13 @@ done:
}
static void
-orientation_changed (MetaOrientationManager *orientation_manager,
- MetaMonitorManager *manager)
+handle_orientation_change (MetaOrientationManager *orientation_manager,
+ MetaMonitorManager *manager)
{
MetaMonitorTransform transform;
GError *error = NULL;
MetaMonitorsConfig *config;
- if (!manager->panel_orientation_managed)
- return;
-
switch (meta_orientation_manager_get_orientation (orientation_manager))
{
case META_ORIENTATION_NORMAL:
@@ -726,6 +723,16 @@ orientation_changed (MetaOrientationManager *orientation_manager,
g_object_unref (config);
}
+static void
+orientation_changed (MetaOrientationManager *orientation_manager,
+ MetaMonitorManager *manager)
+{
+ if (!manager->panel_orientation_managed)
+ return;
+
+ handle_orientation_change (orientation_manager, manager);
+}
+
static void
experimental_features_changed (MetaSettings *settings,
MetaExperimentalFeature old_experimental_features,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]