[gnome-control-center/gnome-3-8] display: use the preferred width and height when moving inactive displays



commit ab281ab7b49880d354b69f6f03b3b63381564eaa
Author: Thomas Wood <thomas wood intel com>
Date:   Wed Jul 17 17:15:25 2013 +0100

    display: use the preferred width and height when moving inactive displays
    
    Inactive displays have a width and height of zero, so use the preferred
    width and height to allow correct positioning.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=704404

 panels/display/cc-display-panel.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c
index ff77e0d..94e9263 100644
--- a/panels/display/cc-display-panel.c
+++ b/panels/display/cc-display-panel.c
@@ -1338,6 +1338,12 @@ list_edges_for_output (GnomeRROutputInfo *output, GArray *edges)
 
   gnome_rr_output_info_get_geometry (output, &x, &y, &w, &h);
 
+  if (!gnome_rr_output_info_is_active (output))
+    {
+      h = gnome_rr_output_info_get_preferred_height (output);
+      w = gnome_rr_output_info_get_preferred_width (output);
+    }
+
   apply_rotation_to_geometry (output, &w, &h);
 
   /* Top, Bottom, Left, Right */
@@ -1538,6 +1544,12 @@ get_output_rect (GnomeRROutputInfo *output, GdkRectangle *rect)
 {
   gnome_rr_output_info_get_geometry (output, &rect->x, &rect->y, &rect->width, &rect->height);
 
+  if (!gnome_rr_output_info_is_active (output))
+    {
+      rect->width = gnome_rr_output_info_get_preferred_width (output);
+      rect->height = gnome_rr_output_info_get_preferred_height (output);
+    }
+
   apply_rotation_to_geometry (output, &rect->width, &rect->height);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]