rpms/control-center/devel rotate.patch, NONE, 1.1 control-center.spec, 1.474, 1.475

Matthias Clasen mclasen at fedoraproject.org
Thu Aug 20 18:45:20 UTC 2009


Author: mclasen

Update of /cvs/pkgs/rpms/control-center/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28035

Modified Files:
	control-center.spec 
Added Files:
	rotate.patch 
Log Message:
fix dragging of rotated monitors in the display capplet


rotate.patch:
 xrandr-capplet.c |   31 ++++++++-----------------------
 1 file changed, 8 insertions(+), 23 deletions(-)

--- NEW FILE rotate.patch ---
diff --git a/capplets/display/xrandr-capplet.c b/capplets/display/xrandr-capplet.c
index 3f4add2..f21857c 100644
--- a/capplets/display/xrandr-capplet.c
+++ b/capplets/display/xrandr-capplet.c
@@ -896,6 +896,13 @@ get_geometry (GnomeOutputInfo *output, int *w, int *h)
 	*h = output->pref_height;
 	*w = output->pref_width;
     }
+   if ((output->rotation & GNOME_RR_ROTATION_90) || (output->rotation & GNOME_RR_ROTATION_270))
+   {
+        int tmp;
+        tmp = *h;
+        *h = *w;
+        *w = tmp;
+   }
 }
 
 #define SPACE 15
@@ -1502,7 +1509,6 @@ paint_output (App *app, cairo_t *cr, int i)
     PangoLayout *layout = get_display_name (app, output);
     PangoRectangle ink_extent, log_extent;
     GdkRectangle viewport;
-    double angle;
     GdkColor output_color;
     double r, g, b;
     double available_w;
@@ -1539,28 +1545,7 @@ paint_output (App *app, cairo_t *cr, int i)
 		     x + (w * scale + 0.5) / 2,
 		     y + (h * scale + 0.5) / 2);
 
-    if (output->rotation & GNOME_RR_ROTATION_0)
-    {
-	angle = 0;
-    }
-    else if (output->rotation & GNOME_RR_ROTATION_90)
-    {
-	angle = 1.5 * G_PI;
-    }
-    else if (output->rotation & GNOME_RR_ROTATION_180)
-    {
-	angle = G_PI;
-    }
-    else if (output->rotation & GNOME_RR_ROTATION_270)
-    {
-	angle = G_PI / 2;
-    }
-    else
-    {
-	angle = 0;
-    }
-
-    cairo_rotate (cr, angle);
+    /* rotation is already applied in get_geometry */
 
     if (output->rotation & GNOME_RR_REFLECT_X)
 	cairo_scale (cr, -1, 1);


Index: control-center.spec
===================================================================
RCS file: /cvs/pkgs/rpms/control-center/devel/control-center.spec,v
retrieving revision 1.474
retrieving revision 1.475
diff -u -p -r1.474 -r1.475
--- control-center.spec	19 Aug 2009 18:55:36 -0000	1.474
+++ control-center.spec	20 Aug 2009 18:45:20 -0000	1.475
@@ -24,7 +24,7 @@
 Summary: Utilities to configure the GNOME desktop
 Name: control-center
 Version: 2.27.90
-Release: 2%{?dist}
+Release: 3%{?dist}
 Epoch: 1
 License: GPLv2+ and GFDL
 Group: User Interface/Desktops
@@ -62,6 +62,9 @@ Patch50: slideshow-ui.patch
 # from upstream
 Patch55: unique-ids.patch
 
+# http://bugzilla.gnome.org/show_bug.cgi?id=578109
+Patch56: rotate.patch
+
 # call the Fedora/RHEL graphical passwd changing apps
 Patch95: gnome-control-center-2.25.2-passwd.patch
 Patch96: gnome-control-center-2.25.2-gecos.patch
@@ -186,6 +189,7 @@ utilities.
 %patch47 -p1 -b .save-as
 %patch50 -p1 -b .slideshow-ui
 %patch55 -p1 -b .unique-ids
+%patch56 -p1 -b .rotate
 
 # vendor configuration patches
 %patch95 -p1 -b .passwd
@@ -365,6 +369,9 @@ fi
 %dir %{_datadir}/gnome-control-center/keybindings
 
 %changelog
+* Thu Aug 20 2009 Matthias Clasen <mclasen at redhat.com> 2.27.90-3
+- Fix dragging of rotated monitors in the display capplet
+
 * Wed Aug 19 2009 Matthias Clasen <mclasen at redhat.com> 2.27.90-2
 - Make the appearance capplet work again
 




More information about the fedora-extras-commits mailing list