[gnome-flashback] monitor-config-manager: fix 90/270 degree rotation not working
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] monitor-config-manager: fix 90/270 degree rotation not working
- Date: Wed, 27 Sep 2017 22:03:19 +0000 (UTC)
commit b2819ed3213d80ee2e82d6dc4d861dd095860750
Author: Hans de Goede <hdegoede redhat com>
Date: Sun Sep 17 12:07:12 2017 +0200
monitor-config-manager: fix 90/270 degree rotation not working
When rotating 90/270 degrees we need to swap width and height. This fixes
the screen going black and the following errors showing in the journal:
gnome-shell[1097]: Failed to set CRTC mode 800x1280: No space left on device
gnome-shell[1097]: Failed to flip: Device or resource busy
gnome-shell[1097]: Failed to set CRTC mode 800x1280: No space left on device
gnome-shell[1097]: Failed to set CRTC mode 800x1280: No space left on device
When rotating a tablet with accelerometer 90/270 degrees.
https://bugzilla.gnome.org/show_bug.cgi?id=787836
backends/gf-monitor-config-manager.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/backends/gf-monitor-config-manager.c b/backends/gf-monitor-config-manager.c
index 67cb37e..4580dcb 100644
--- a/backends/gf-monitor-config-manager.c
+++ b/backends/gf-monitor-config-manager.c
@@ -412,6 +412,15 @@ create_for_builtin_display_rotation (GfMonitorConfigManager *config_manager,
logical_monitor_config->monitor_configs = g_list_append (NULL, monitor_config);
logical_monitor_config->transform = transform;
+ if (gf_monitor_transform_is_rotated (current_logical_monitor_config->transform) !=
+ gf_monitor_transform_is_rotated (logical_monitor_config->transform))
+ {
+ gint temp = logical_monitor_config->layout.width;
+
+ logical_monitor_config->layout.width = logical_monitor_config->layout.height;
+ logical_monitor_config->layout.height = temp;
+ }
+
return gf_monitors_config_new (g_list_append (NULL, logical_monitor_config),
config_manager->current_config->layout_mode,
GF_MONITORS_CONFIG_FLAG_NONE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]