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
This commit is contained in:
Hans de Goede 2020-10-15 12:21:05 +02:00 committed by Carlos Garnacho
parent 21c714a0f2
commit 4c12208363

View File

@ -678,16 +678,13 @@ done:
}
static void
orientation_changed (MetaOrientationManager *orientation_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,