summaryrefslogtreecommitdiff
path: root/src/backends
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2020-10-15 12:21:05 +0200
committerCarlos Garnacho <carlosg@gnome.org>2020-10-18 21:35:09 +0000
commit4c1220836331b9442a54ff0ec9dfa5ab55ed91e3 (patch)
tree972999a5aaaca34bfe5b13fc1eff33ec12eb7548 /src/backends
parent21c714a0f25fedcd8f8511ab5e733aa5b8b09b07 (diff)
downloadmutter-4c1220836331b9442a54ff0ec9dfa5ab55ed91e3.tar.gz
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
Diffstat (limited to 'src/backends')
-rw-r--r--src/backends/meta-monitor-manager.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c
index 1c6d37c30..18aeddcd9 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:
@@ -727,6 +724,16 @@ orientation_changed (MetaOrientationManager *orientation_manager,
}
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,
MetaMonitorManager *manager)