[gnome-flashback] monitor-manager: add a handle_orientation_change helper function
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] monitor-manager: add a handle_orientation_change helper function
- Date: Sat, 23 Oct 2021 18:48:44 +0000 (UTC)
commit 21ab7e8cd1deb1de4811ad71fda49e27a8bacc37
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Sep 12 21:47:12 2021 +0300
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.
Based on mutter commit:
https://gitlab.gnome.org/GNOME/mutter/-/commit/4c1220836331
backends/gf-monitor-manager.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/backends/gf-monitor-manager.c b/backends/gf-monitor-manager.c
index 074eddc..dbcc097 100644
--- a/backends/gf-monitor-manager.c
+++ b/backends/gf-monitor-manager.c
@@ -501,16 +501,13 @@ gf_monitor_manager_apply_monitors_config (GfMonitorManager *manager,
}
static void
-orientation_changed (GfOrientationManager *orientation_manager,
- GfMonitorManager *manager)
+handle_orientation_change (GfOrientationManager *orientation_manager,
+ GfMonitorManager *manager)
{
GfMonitorTransform transform;
GError *error = NULL;
GfMonitorsConfig *config;
- if (!manager->panel_orientation_managed)
- return;
-
switch (gf_orientation_manager_get_orientation (orientation_manager))
{
case GF_ORIENTATION_NORMAL:
@@ -549,6 +546,16 @@ orientation_changed (GfOrientationManager *orientation_manager,
g_object_unref (config);
}
+static void
+orientation_changed (GfOrientationManager *orientation_manager,
+ GfMonitorManager *self)
+{
+ if (!self->panel_orientation_managed)
+ return;
+
+ handle_orientation_change (orientation_manager, self);
+}
+
static void
update_panel_orientation_managed (GfMonitorManager *self)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]