[gnome-desktop] Revert "Allow rotation if the virtual size has the correct number of pixels"



commit fe6fdee20f2b0bb3fc2ad3f30506dea62905711d
Author: Ray Strode <rstrode redhat com>
Date:   Thu Jun 7 14:34:34 2012 -0400

    Revert "Allow rotation if the virtual size has the correct number of pixels"
    
    This reverts commit 8ba5e616ceb10ae8f1138eaa550ec65742195b78.
    
    It makes the checking too liberal and allows things through that will
    ultimately fail.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=640237

 libgnome-desktop/gnome-rr-config.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/libgnome-desktop/gnome-rr-config.c b/libgnome-desktop/gnome-rr-config.c
index 708e6d0..3e80e38 100644
--- a/libgnome-desktop/gnome-rr-config.c
+++ b/libgnome-desktop/gnome-rr-config.c
@@ -1817,18 +1817,14 @@ crtc_assignment_new (GnomeRRScreen *screen, GnomeRROutputInfo **outputs, GError
     {
 	int width, height;
 	int min_width, max_width, min_height, max_height;
-	int required_pixels, min_pixels, max_pixels;
 
 	get_required_virtual_size (assignment, &width, &height);
 
 	gnome_rr_screen_get_ranges (
 	    screen, &min_width, &max_width, &min_height, &max_height);
-
-	required_pixels = width * height;
-	min_pixels = min_width * min_height;
-	max_pixels = max_width * max_height;
-
-	if (required_pixels < min_pixels || required_pixels > max_pixels)
+    
+	if (width < min_width || width > max_width ||
+	    height < min_height || height > max_height)
 	{
 	    g_set_error (error, GNOME_RR_ERROR, GNOME_RR_ERROR_BOUNDS_ERROR,
 			 /* Translators: the "requested", "minimum", and



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