rpms/gnome-desktop/devel add-randr-12.patch, 1.5, 1.6 gnome-desktop.spec, 1.117, 1.118
Soren Sandmann Pedersen (ssp)
fedora-extras-commits at redhat.com
Mon Feb 4 13:47:57 UTC 2008
Author: ssp
Update of /cvs/pkgs/rpms/gnome-desktop/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8371
Modified Files:
add-randr-12.patch gnome-desktop.spec
Log Message:
Update randrwrap
add-randr-12.patch:
Index: add-randr-12.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-desktop/devel/add-randr-12.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- add-randr-12.patch 31 Jan 2008 20:05:20 -0000 1.5
+++ add-randr-12.patch 4 Feb 2008 13:47:45 -0000 1.6
@@ -1,6 +1,6 @@
diff -up gnome-desktop-2.21.90/configure.in.add-randr-12 gnome-desktop-2.21.90/configure.in
--- gnome-desktop-2.21.90/configure.in.add-randr-12 2008-01-27 18:48:13.000000000 -0500
-+++ gnome-desktop-2.21.90/configure.in 2008-01-29 03:27:34.000000000 -0500
++++ gnome-desktop-2.21.90/configure.in 2008-01-31 16:44:28.000000000 -0500
@@ -51,10 +51,10 @@ AC_SUBST(GNOME_MICRO)
AC_SUBST(GNOME_DISTRIBUTOR)
AC_SUBST(GNOME_DATE)
@@ -18,7 +18,7 @@
diff -up gnome-desktop-2.21.90/libgnome-desktop/libgnomeui/Makefile.am.add-randr-12 gnome-desktop-2.21.90/libgnome-desktop/libgnomeui/Makefile.am
--- gnome-desktop-2.21.90/libgnome-desktop/libgnomeui/Makefile.am.add-randr-12 2008-01-27 18:44:20.000000000 -0500
-+++ gnome-desktop-2.21.90/libgnome-desktop/libgnomeui/Makefile.am 2008-01-29 03:27:34.000000000 -0500
++++ gnome-desktop-2.21.90/libgnome-desktop/libgnomeui/Makefile.am 2008-01-31 16:44:28.000000000 -0500
@@ -2,4 +2,5 @@ libgnomeui_desktopdir = $(includedir)/gn
libgnomeui_desktop_HEADERS = \
gnome-ditem-edit.h \
@@ -28,8 +28,8 @@
+ randrwrap.h
diff -up /dev/null gnome-desktop-2.21.90/libgnome-desktop/libgnomeui/randrwrap.h
--- /dev/null 2008-01-30 11:34:25.225700292 -0500
-+++ gnome-desktop-2.21.90/libgnome-desktop/libgnomeui/randrwrap.h 2008-01-31 14:56:02.000000000 -0500
-@@ -0,0 +1,93 @@
++++ gnome-desktop-2.21.90/libgnome-desktop/libgnomeui/randrwrap.h 2008-02-04 08:33:51.000000000 -0500
+@@ -0,0 +1,100 @@
+#ifndef I_KNOW_THIS_IS_UNSTABLE_AND_ONLY_IN_FEDORA
+#error This is not yet for general consumption.
+#endif
@@ -49,10 +49,12 @@
+
+typedef enum
+{
-+ RW_ROTATE_0,
-+ RW_ROTATE_90,
-+ RW_ROTATE_180,
-+ RW_ROTATE_270
++ RW_ROTATION_0 = (1 << 0),
++ RW_ROTATION_90 = (1 << 1),
++ RW_ROTATION_180 = (1 << 2),
++ RW_ROTATION_270 = (1 << 3),
++ RW_REFLECT_X = (1 << 4),
++ RW_REFLECT_Y = (1 << 5)
+} RWRotation;
+
+/* RWScreen */
@@ -110,10 +112,11 @@
+/* RWCrtc */
+guint32 rw_crtc_get_id (RWCrtc *crtc);
+gboolean rw_crtc_set_config (RWCrtc *crtc,
-+ int x,
-+ int y,
-+ RWMode *mode,
-+ RWOutput **outputs,
++ int x,
++ int y,
++ RWMode *mode,
++ RWRotation rotation,
++ RWOutput **outputs,
+ int n_outputs);
+gboolean rw_crtc_can_drive_output (RWCrtc *crtc,
+ RWOutput *output);
@@ -121,12 +124,16 @@
+void rw_crtc_get_position (RWCrtc *crtc,
+ int *x,
+ int *y);
++RWRotation rw_crtc_get_current_rotation (RWCrtc *crtc);
++RWRotation rw_crtc_get_rotations (RWCrtc *crtc);
++gboolean rw_crtc_supports_rotation (RWCrtc *crtc,
++ RWRotation rotation);
+
+#endif
diff -up /dev/null gnome-desktop-2.21.90/libgnome-desktop/randrwrap.c
--- /dev/null 2008-01-30 11:34:25.225700292 -0500
-+++ gnome-desktop-2.21.90/libgnome-desktop/randrwrap.c 2008-01-31 14:56:02.000000000 -0500
-@@ -0,0 +1,968 @@
++++ gnome-desktop-2.21.90/libgnome-desktop/randrwrap.c 2008-02-04 08:33:51.000000000 -0500
+@@ -0,0 +1,1042 @@
+#define I_KNOW_THIS_IS_UNSTABLE_AND_ONLY_IN_FEDORA
+#include "libgnomeui/randrwrap.h"
+#include <string.h>
@@ -188,6 +195,9 @@
+ RWOutput ** possible_outputs;
+ int x;
+ int y;
++
++ RWRotation current_rotation;
++ RWRotation rotations;
+};
+
+struct RWMode
@@ -819,11 +829,57 @@
+}
+
+/* RWCrtc */
++typedef struct
++{
++ Rotation xrot;
++ RWRotation rot;
++} RotationMap;
++static const RotationMap rotation_map[] =
++{
++ { RR_Rotate_0, RW_ROTATION_0 },
++ { RR_Rotate_90, RW_ROTATION_90 },
++ { RR_Rotate_180, RW_ROTATION_180 },
++ { RR_Rotate_270, RW_ROTATION_270 },
++ { RR_Reflect_X, RW_REFLECT_X },
++ { RR_Reflect_Y, RW_REFLECT_Y },
++};
++
++static RWRotation
++rw_rotation_from_xrotation (Rotation r)
++{
++ int i;
++ RWRotation result = 0;
++
++ for (i = 0; i < G_N_ELEMENTS (rotation_map); ++i)
++ {
++ if (r & rotation_map[i].xrot)
++ result |= rotation_map[i].rot;
++ }
++
++ return result;
++}
++
++static Rotation
++xrotation_from_rotation (RWRotation r)
++{
++ int i;
++ Rotation result = 0;
++
++ for (i = 0; i < G_N_ELEMENTS (rotation_map); ++i)
++ {
++ if (r & rotation_map[i].rot)
++ result |= rotation_map[i].xrot;
++ }
++
++ return result;
++}
++
+gboolean
+rw_crtc_set_config (RWCrtc *crtc,
+ int x,
+ int y,
+ RWMode *mode,
++ RWRotation rotation,
+ RWOutput **outputs,
+ int n_outputs)
+{
@@ -856,7 +912,8 @@
+ XRRSetCrtcConfig (screen->xdisplay, screen->resources, crtc->id,
+ CurrentTime,
+ x, y,
-+ mode? mode->id : None, RR_Rotate_0,
++ mode? mode->id : None,
++ xrotation_from_rotation (rotation),
+ (RROutput *)output_ids->data,
+ output_ids->len);
+
@@ -914,6 +971,26 @@
+ *y = crtc->y;
+}
+
++/* FIXME: merge with get_mode()? */
++RWRotation
++rw_crtc_get_current_rotation (RWCrtc *crtc)
++{
++ return crtc->current_rotation;
++}
++
++RWRotation
++rw_crtc_get_rotations (RWCrtc *crtc)
++{
++ return crtc->rotations;
++}
++
++gboolean
++rw_crtc_supports_rotation (RWCrtc * crtc,
++ RWRotation rotation)
++{
++ return (crtc->rotations & rotation);
++}
++
+static RWCrtc *
+crtc_new (RWScreen *screen, RROutput id)
+{
@@ -967,7 +1044,11 @@
+ }
+ g_ptr_array_add (a, NULL);
+ crtc->possible_outputs = (RWOutput **)g_ptr_array_free (a, FALSE);
-+
++
++ /* Rotations */
++ crtc->current_rotation = rw_rotation_from_xrotation (info->rotation);
++ crtc->rotations = rw_rotation_from_xrotation (info->rotations);
++
+ XRRFreeCrtcInfo (info);
+}
+
@@ -1097,7 +1178,7 @@
+#endif
diff -up gnome-desktop-2.21.90/libgnome-desktop/Makefile.am.add-randr-12 gnome-desktop-2.21.90/libgnome-desktop/Makefile.am
--- gnome-desktop-2.21.90/libgnome-desktop/Makefile.am.add-randr-12 2008-01-27 18:44:20.000000000 -0500
-+++ gnome-desktop-2.21.90/libgnome-desktop/Makefile.am 2008-01-29 03:27:34.000000000 -0500
++++ gnome-desktop-2.21.90/libgnome-desktop/Makefile.am 2008-01-31 16:44:28.000000000 -0500
@@ -20,7 +20,8 @@ libgnome_desktop_2_la_SOURCES = \
gnome-desktop-item.c \
gnome-ditem-edit.c \
Index: gnome-desktop.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-desktop/devel/gnome-desktop.spec,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -r1.117 -r1.118
--- gnome-desktop.spec 31 Jan 2008 21:11:53 -0000 1.117
+++ gnome-desktop.spec 4 Feb 2008 13:47:45 -0000 1.118
@@ -13,7 +13,7 @@
Summary: Package containing code shared among gnome-panel, gnome-session, nautilus, etc
Name: gnome-desktop
Version: 2.21.90
-Release: 4%{?dist}
+Release: 5%{?dist}
URL: http://www.gnome.org
Source0: http://download.gnome.org/sources/gnome-desktop/2.21/%{name}-%{version}.tar.bz2
License: GPLv2+ and LGPLv2+
@@ -122,6 +122,9 @@
%doc %{_datadir}/gtk-doc/html/gnome-desktop/
%changelog
+* Mon Feb 4 2008 Soren Sandmann <sandmann at redhat.com> - 2.21.90-5
+- Update randrwrap - add rotations.
+
* Thu Jan 29 2008 Soren Sandmann <sandmann at redhat.com> - 2.21.90-3
- Update randrwrap.
More information about the fedora-extras-commits
mailing list