rpms/gnome-desktop/devel add-randr-12.patch, 1.10, 1.11 gnome-desktop.spec, 1.124, 1.125
Soren Sandmann Pedersen (ssp)
fedora-extras-commits at redhat.com
Sat Feb 16 01:38:19 UTC 2008
- Previous message (by thread): rpms/kdeadmin/F-8 .cvsignore, 1.37, 1.38 kdeadmin.spec, 1.80, 1.81 sources, 1.39, 1.40
- Next message (by thread): rpms/control-center/devel add-randr12-capplet.patch, 1.10, 1.11 control-center.spec, 1.340, 1.341
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: ssp
Update of /cvs/pkgs/rpms/gnome-desktop/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10646
Modified Files:
add-randr-12.patch gnome-desktop.spec
Log Message:
Update randr code
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.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- add-randr-12.patch 13 Feb 2008 15:48:32 -0000 1.10
+++ add-randr-12.patch 16 Feb 2008 01:38:09 -0000 1.11
@@ -1,6 +1,6 @@
diff -up gnome-desktop-2.21.91/configure.in.add-randr-12 gnome-desktop-2.21.91/configure.in
--- gnome-desktop-2.21.91/configure.in.add-randr-12 2008-02-11 13:38:20.000000000 -0500
-+++ gnome-desktop-2.21.91/configure.in 2008-02-13 10:36:07.000000000 -0500
++++ gnome-desktop-2.21.91/configure.in 2008-02-13 10:51:26.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.91/libgnome-desktop/libgnomeui/Makefile.am.add-randr-12 gnome-desktop-2.21.91/libgnome-desktop/libgnomeui/Makefile.am
--- gnome-desktop-2.21.91/libgnome-desktop/libgnomeui/Makefile.am.add-randr-12 2008-02-11 13:35:11.000000000 -0500
-+++ gnome-desktop-2.21.91/libgnome-desktop/libgnomeui/Makefile.am 2008-02-13 10:36:07.000000000 -0500
++++ gnome-desktop-2.21.91/libgnome-desktop/libgnomeui/Makefile.am 2008-02-13 10:51:26.000000000 -0500
@@ -2,4 +2,7 @@ libgnomeui_desktopdir = $(includedir)/gn
libgnomeui_desktop_HEADERS = \
gnome-ditem-edit.h \
@@ -30,7 +30,7 @@
+
diff -up /dev/null gnome-desktop-2.21.91/libgnome-desktop/libgnomeui/monitor-db.h
--- /dev/null 2008-02-13 09:53:53.228642516 -0500
-+++ gnome-desktop-2.21.91/libgnome-desktop/libgnomeui/monitor-db.h 2008-02-13 10:36:07.000000000 -0500
++++ gnome-desktop-2.21.91/libgnome-desktop/libgnomeui/monitor-db.h 2008-02-15 20:28:36.000000000 -0500
@@ -0,0 +1,51 @@
+#ifndef I_KNOW_THIS_IS_UNSTABLE_AND_ONLY_IN_FEDORA
+#error This is not for general consumption yet.
@@ -85,7 +85,7 @@
+#endif
diff -up /dev/null gnome-desktop-2.21.91/libgnome-desktop/libgnomeui/randrwrap.h
--- /dev/null 2008-02-13 09:53:53.228642516 -0500
-+++ gnome-desktop-2.21.91/libgnome-desktop/libgnomeui/randrwrap.h 2008-02-13 10:36:07.000000000 -0500
++++ gnome-desktop-2.21.91/libgnome-desktop/libgnomeui/randrwrap.h 2008-02-15 20:28:36.000000000 -0500
@@ -0,0 +1,100 @@
+#ifndef I_KNOW_THIS_IS_UNSTABLE_AND_ONLY_IN_FEDORA
+#error This is not yet for general consumption.
@@ -128,7 +128,7 @@
+ int mm_height);
+RWCrtc * rw_screen_get_crtc_by_id (RWScreen *screen,
+ guint32 id);
-+void rw_screen_refresh (RWScreen *screen);
++gboolean rw_screen_refresh (RWScreen *screen);
+RWOutput * rw_screen_get_output_by_id (RWScreen *screen,
+ guint32 id);
+RWOutput * rw_screen_get_output_by_name (RWScreen *screen,
@@ -189,8 +189,8 @@
+#endif
diff -up /dev/null gnome-desktop-2.21.91/libgnome-desktop/monitor-db.c
--- /dev/null 2008-02-13 09:53:53.228642516 -0500
-+++ gnome-desktop-2.21.91/libgnome-desktop/monitor-db.c 2008-02-13 10:36:07.000000000 -0500
-@@ -0,0 +1,1174 @@
++++ gnome-desktop-2.21.91/libgnome-desktop/monitor-db.c 2008-02-15 20:28:36.000000000 -0500
+@@ -0,0 +1,1178 @@
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
@@ -531,7 +531,9 @@
+ Configuration *config = g_new0 (Configuration, 1);
+ GPtrArray *a = g_ptr_array_new ();
+ int i;
-+ RWOutput **rw_outputs = rw_screen_list_outputs (screen);
++ RWOutput **rw_outputs;
++
++ rw_outputs = rw_screen_list_outputs (screen);
+
+ for (i = 0; rw_outputs[i] != NULL; ++i)
+ {
@@ -579,13 +581,12 @@
+ }
+
+ crtc = rw_output_get_crtc (rw_output);
++ mode = crtc? rw_crtc_get_current_mode (crtc) : NULL;
+
-+ if (crtc)
++ if (crtc && mode)
+ {
+ output->on = TRUE;
+
-+ mode = rw_crtc_get_current_mode (crtc);
-+
+ rw_crtc_get_position (crtc, &output->x, &output->y);
+ output->width = rw_mode_get_width (mode);
+ output->height = rw_mode_get_height (mode);
@@ -968,10 +969,13 @@
+ char *file = g_build_filename (
+ g_get_home_dir(), ".gnome2", "monitors.xml", NULL);
+ Configuration **configs = configurations_read (file, NULL);
-+ Configuration *current = configuration_new_current (screen);
++ Configuration *current;
+ Configuration *found;
+ gboolean result;
+
++ rw_screen_refresh (screen);
++
++ current = configuration_new_current (screen);
+ if (configs)
+ {
+ if ((found = configuration_find (configs, current)))
@@ -1367,8 +1371,8 @@
+}
diff -up /dev/null gnome-desktop-2.21.91/libgnome-desktop/randrwrap.c
--- /dev/null 2008-02-13 09:53:53.228642516 -0500
-+++ gnome-desktop-2.21.91/libgnome-desktop/randrwrap.c 2008-02-13 10:36:07.000000000 -0500
-@@ -0,0 +1,1042 @@
++++ gnome-desktop-2.21.91/libgnome-desktop/randrwrap.c 2008-02-15 20:28:36.000000000 -0500
+@@ -0,0 +1,1122 @@
+#define I_KNOW_THIS_IS_UNSTABLE_AND_ONLY_IN_FEDORA
+#include "libgnomeui/randrwrap.h"
+#include <string.h>
@@ -1378,34 +1382,44 @@
+#include <gdk/gdkx.h>
+#include <X11/Xatom.h>
+
-+struct RWScreen
-+{
-+ GdkScreen * gdk_screen;
-+ GdkWindow * gdk_root;
-+ Display * xdisplay;
-+ Screen * xscreen;
-+ Window xroot;
-+
-+ int randr_event_base;
++#define DISPLAY(o) ((o)->info->screen->xdisplay)
+
++typedef struct ScreenInfo ScreenInfo;
++
++struct ScreenInfo
++{
+ int min_width;
+ int max_width;
+ int min_height;
+ int max_height;
-+
-+ RWScreenChanged callback;
-+ gpointer data;
+
+ XRRScreenResources *resources;
+
+ RWOutput ** outputs;
+ RWCrtc ** crtcs;
+ RWMode ** modes;
++
++ RWScreen * screen;
++};
++
++struct RWScreen
++{
++ GdkScreen * gdk_screen;
++ GdkWindow * gdk_root;
++ Display * xdisplay;
++ Screen * xscreen;
++ Window xroot;
++ ScreenInfo * info;
++
++ int randr_event_base;
++
++ RWScreenChanged callback;
++ gpointer data;
+};
+
+struct RWOutput
+{
-+ RWScreen * screen;
++ ScreenInfo * info;
+ RROutput id;
+
+ char * name;
@@ -1420,9 +1434,14 @@
+ guint8 * edid_data;
+};
+
++struct RWOutputWrap
++{
++ RROutput id;
++};
++
+struct RWCrtc
+{
-+ RWScreen * screen;
++ ScreenInfo * info;
+ RRCrtc id;
+
+ RWMode * current_mode;
@@ -1437,7 +1456,7 @@
+
+struct RWMode
+{
-+ RWScreen * screen;
++ ScreenInfo * info;
+ RRMode id;
+ char * name;
+ int width;
@@ -1446,7 +1465,7 @@
+};
+
+/* RWCrtc */
-+static RWCrtc * crtc_new (RWScreen *screen,
++static RWCrtc * crtc_new (ScreenInfo *info,
+ RRCrtc id);
+static void crtc_free (RWCrtc *crtc);
+static void crtc_initialize (RWCrtc *crtc,
@@ -1454,7 +1473,7 @@
+
+
+/* RWOutput */
-+static RWOutput *output_new (RWScreen *screen,
++static RWOutput *output_new (ScreenInfo *info,
+ RROutput id);
+static void output_initialize (RWOutput *output,
+ XRRScreenResources *res);
@@ -1462,7 +1481,7 @@
+
+
+/* RWMode */
-+static RWMode * mode_new (RWScreen *screen,
++static RWMode * mode_new (ScreenInfo *info,
+ RRMode id);
+static void mode_initialize (RWMode *mode,
+ XRRModeInfo *info);
@@ -1471,11 +1490,11 @@
+
+/* Screen */
+static RWOutput *
-+rw_output_by_id (RWScreen *screen, RROutput id)
++rw_output_by_id (ScreenInfo *info, RROutput id)
+{
+ RWOutput **output;
+
-+ for (output = screen->outputs; *output; ++output)
++ for (output = info->outputs; *output; ++output)
+ {
+ if ((*output)->id == id)
+ return *output;
@@ -1485,11 +1504,11 @@
+}
+
+static RWCrtc *
-+crtc_by_id (RWScreen *screen, RRCrtc id)
++crtc_by_id (ScreenInfo *info, RRCrtc id)
+{
+ RWCrtc **crtc;
+
-+ for (crtc = screen->crtcs; *crtc; ++crtc)
++ for (crtc = info->crtcs; *crtc; ++crtc)
+ {
+ if ((*crtc)->id == id)
+ return *crtc;
@@ -1499,11 +1518,11 @@
+}
+
+static RWMode *
-+mode_by_id (RWScreen *screen, RRMode id)
++mode_by_id (ScreenInfo *info, RRMode id)
+{
+ RWMode **mode;
+
-+ for (mode = screen->modes; *mode; ++mode)
++ for (mode = info->modes; *mode; ++mode)
+ {
+ if ((*mode)->id == id)
+ return *mode;
@@ -1513,54 +1532,54 @@
+}
+
+static void
-+screen_free_resources (RWScreen *screen)
++screen_info_free (ScreenInfo *info)
+{
+ RWOutput **output;
+ RWCrtc **crtc;
+ RWMode **mode;
+
-+ if (screen->resources)
++ if (info->resources)
+ {
-+ XRRFreeScreenResources (screen->resources);
++ XRRFreeScreenResources (info->resources);
+
-+ screen->resources = NULL;
++ info->resources = NULL;
+ }
+
-+ if (screen->outputs)
++ if (info->outputs)
+ {
-+ for (output = screen->outputs; *output; ++output)
++ for (output = info->outputs; *output; ++output)
+ output_free (*output);
-+ g_free (screen->outputs);
++ g_free (info->outputs);
+ }
+
-+ if (screen->crtcs)
++ if (info->crtcs)
+ {
-+ for (crtc = screen->crtcs; *crtc; ++crtc)
++ for (crtc = info->crtcs; *crtc; ++crtc)
+ crtc_free (*crtc);
-+ g_free (screen->crtcs);
++ g_free (info->crtcs);
+ }
+
-+ if (screen->modes)
++ if (info->modes)
+ {
-+ for (mode = screen->modes; *mode; ++mode)
++ for (mode = info->modes; *mode; ++mode)
+ mode_free (*mode);
-+ g_free (screen->modes);
++ g_free (info->modes);
+ }
++
++ g_free (info);
+}
+
-+static void
-+screen_update (RWScreen *screen,
-+ gboolean call_callback)
++static gboolean
++fill_out_screen_info (Display *xdisplay, Window xroot,
++ ScreenInfo *info)
+{
+ XRRScreenResources *resources;
+
-+ g_return_if_fail (screen != NULL);
-+
-+ XRRGetScreenSizeRange (screen->xdisplay, screen->xroot,
-+ &(screen->min_width),
-+ &(screen->min_height),
-+ &(screen->max_width),
-+ &(screen->max_height));
++ XRRGetScreenSizeRange (xdisplay, xroot,
++ &(info->min_width),
++ &(info->min_height),
++ &(info->max_width),
++ &(info->max_height));
+
+#if 0
+ g_print ("ranges: %d - %d; %d - %d\n",
@@ -1568,8 +1587,8 @@
+ screen->min_height, screen->max_height);
+#endif
+
-+ resources = XRRGetScreenResources (screen->xdisplay, screen->xroot);
-+
++ resources = XRRGetScreenResources (xdisplay, xroot);
++
+ if (resources)
+ {
+ int i;
@@ -1577,9 +1596,10 @@
+ RWCrtc **crtc;
+ RWOutput **output;
+
-+ screen_free_resources (screen);
-+
-+ screen->resources = resources;
++ g_print ("Resource Timestamp: %u\n", (guint32)resources->timestamp);
++ g_print ("Resource Configuration Timestamp: %u\n", (guint32)resources->configTimestamp);
++
++ info->resources = resources;
+
+ /* We create all the structures before initializing them, so
+ * that they can refer to each other.
@@ -1587,50 +1607,108 @@
+ a = g_ptr_array_new ();
+ for (i = 0; i < resources->ncrtc; ++i)
+ {
-+ RWCrtc *crtc = crtc_new (screen, resources->crtcs[i]);
++ RWCrtc *crtc = crtc_new (info, resources->crtcs[i]);
+
+ g_ptr_array_add (a, crtc);
+ }
+ g_ptr_array_add (a, NULL);
-+ screen->crtcs = (RWCrtc **)g_ptr_array_free (a, FALSE);
++ info->crtcs = (RWCrtc **)g_ptr_array_free (a, FALSE);
+
+ a = g_ptr_array_new ();
+ for (i = 0; i < resources->noutput; ++i)
+ {
-+ RWOutput *output = output_new (screen, resources->outputs[i]);
++ RWOutput *output = output_new (info, resources->outputs[i]);
+
+ g_ptr_array_add (a, output);
+ }
+ g_ptr_array_add (a, NULL);
-+ screen->outputs = (RWOutput **)g_ptr_array_free (a, FALSE);
++ info->outputs = (RWOutput **)g_ptr_array_free (a, FALSE);
+
+ a = g_ptr_array_new ();
+ for (i = 0; i < resources->nmode; ++i)
+ {
-+ RWMode *mode = mode_new (screen, resources->modes[i].id);
++ RWMode *mode = mode_new (info, resources->modes[i].id);
+
+ g_ptr_array_add (a, mode);
+ }
+ g_ptr_array_add (a, NULL);
-+ screen->modes = (RWMode **)g_ptr_array_free (a, FALSE);
++ info->modes = (RWMode **)g_ptr_array_free (a, FALSE);
+
+ /* Initialize */
-+ for (crtc = screen->crtcs; *crtc; ++crtc)
++ for (crtc = info->crtcs; *crtc; ++crtc)
+ crtc_initialize (*crtc, resources);
+
-+ for (output = screen->outputs; *output; ++output)
++ for (output = info->outputs; *output; ++output)
+ output_initialize (*output, resources);
+
+ for (i = 0; i < resources->nmode; ++i)
+ {
-+ RWMode *mode = mode_by_id (screen, resources->modes[i].id);
++ RWMode *mode = mode_by_id (info, resources->modes[i].id);
+
+ mode_initialize (mode, &(resources->modes[i]));
+ }
++
++ return TRUE;
++ }
++ else
++ {
++ g_print ("Couldn't get screen resources\n");
++
++ return FALSE;
++ }
++}
++
++static ScreenInfo *
++screen_info_new (RWScreen *screen)
++{
++ ScreenInfo *info = g_new0 (ScreenInfo, 1);
++ RWOutput **o;
++
++ info->outputs = NULL;
++ info->crtcs = NULL;
++ info->modes = NULL;
++ info->screen = screen;
++
++ if (fill_out_screen_info (screen->xdisplay, screen->xroot, info))
++ {
++ return info;
++ }
++ else
++ {
++ g_free (info);
++ return NULL;
++ }
++
++ for (o = info->outputs; *o; o++)
++ {
++
++ }
++
++}
++
++static gboolean
++screen_update (RWScreen *screen, gboolean force_callback)
++{
++ ScreenInfo *info;
++ gboolean changed = FALSE;
++
++ g_return_val_if_fail (screen != NULL, FALSE);
++
++ info = screen_info_new (screen);
++ if (info)
++ {
++ if (info->resources->configTimestamp != screen->info->resources->configTimestamp)
++ changed = TRUE;
++
++ screen_info_free (screen->info);
++
++ screen->info = info;
+ }
+
-+ if (call_callback && screen->callback)
++ if ((changed || force_callback) && screen->callback)
+ screen->callback (screen, screen->data);
++
++ return changed;
+}
+
+static GdkFilterReturn
@@ -1643,7 +1721,15 @@
+
+ if (e->type - screen->randr_event_base == RRNotify)
+ {
-+ /* FIXME: we probably need to be more discriminating in
++ XRRNotifyEvent *event = (XRRNotifyEvent *)e;
++
++ switch (event->subtype)
++ {
++ default:
++ break;
++ }
++
++ /* FIXME: we may need to be more discriminating in
+ * what causes 'changed' events
+ */
+ screen_update (screen, TRUE);
@@ -1671,17 +1757,13 @@
+ screen->xroot = gdk_x11_drawable_get_xid (screen->gdk_root);
+ screen->xdisplay = dpy;
+ screen->xscreen = gdk_x11_screen_get_xscreen (screen->gdk_screen);
-+
++
+ screen->callback = callback;
+ screen->data = data;
+
+ screen->randr_event_base = event_base;
-+
-+ screen->outputs = NULL;
-+ screen->crtcs = NULL;
-+ screen->modes = NULL;
-+
-+ screen_update (screen, FALSE);
++
++ screen->info = screen_info_new (screen);
+
+ XRRSelectInput (screen->xdisplay,
+ screen->xroot,
@@ -1724,40 +1806,40 @@
+ g_return_if_fail (screen != NULL);
+
+ if (min_width)
-+ *min_width = screen->min_width;
++ *min_width = screen->info->min_width;
+
+ if (max_width)
-+ *max_width = screen->max_width;
++ *max_width = screen->info->max_width;
+
+ if (min_height)
-+ *min_height = screen->min_height;
++ *min_height = screen->info->min_height;
+
+ if (max_height)
-+ *max_height = screen->max_height;
++ *max_height = screen->info->max_height;
+}
+
-+void
++gboolean
+rw_screen_refresh (RWScreen *screen)
+{
-+ screen_update (screen, TRUE);
++ return screen_update (screen, FALSE);
+}
+
+RWMode **
+rw_screen_list_modes (RWScreen *screen)
+{
-+ return screen->modes;
++ return screen->info->modes;
+}
+
+RWCrtc **
+rw_screen_list_crtcs (RWScreen *screen)
+{
-+ return screen->crtcs;
++ return screen->info->crtcs;
+}
+
+RWOutput **
+rw_screen_list_outputs (RWScreen *screen)
+{
-+ return screen->outputs;
++ return screen->info->outputs;
+}
+
+RWCrtc *
@@ -1766,10 +1848,10 @@
+{
+ int i;
+
-+ for (i = 0; screen->crtcs[i] != NULL; ++i)
++ for (i = 0; screen->info->crtcs[i] != NULL; ++i)
+ {
-+ if (screen->crtcs[i]->id == id)
-+ return screen->crtcs[i];
++ if (screen->info->crtcs[i]->id == id)
++ return screen->info->crtcs[i];
+ }
+
+ return NULL;
@@ -1781,10 +1863,10 @@
+{
+ int i;
+
-+ for (i = 0; screen->outputs[i] != NULL; ++i)
++ for (i = 0; screen->info->outputs[i] != NULL; ++i)
+ {
-+ if (screen->outputs[i]->id == id)
-+ return screen->outputs[i];
++ if (screen->info->outputs[i]->id == id)
++ return screen->info->outputs[i];
+ }
+
+ return NULL;
@@ -1792,12 +1874,12 @@
+
+/* RWOutput */
+static RWOutput *
-+output_new (RWScreen *screen, RROutput id)
++output_new (ScreenInfo *info, RROutput id)
+{
+ RWOutput *output = g_new0 (RWOutput, 1);
+
+ output->id = id;
-+ output->screen = screen;
++ output->info = info;
+
+ return output;
+}
@@ -1839,11 +1921,12 @@
+static guint8 *
+read_edid_data (RWOutput *output)
+{
-+ Atom edid_atom = XInternAtom (output->screen->xdisplay, "EDID_DATA", FALSE);
++ Atom edid_atom = XInternAtom (DISPLAY (output), "EDID_DATA", FALSE);
+ guint8 *result;
+ int len;
+
-+ result = get_property (output->screen->xdisplay, output->id, edid_atom, &len);
++ result = get_property (DISPLAY (output),
++ output->id, edid_atom, &len);
+
+ if (result)
+ {
@@ -1860,10 +1943,12 @@
+output_initialize (RWOutput *output, XRRScreenResources *res)
+{
+ XRROutputInfo *info = XRRGetOutputInfo (
-+ output->screen->xdisplay, res, output->id);
++ DISPLAY (output), res, output->id);
+ GPtrArray *a;
+ int i;
+
++ g_print ("Output %lx Timestamp: %u\n", output->id, (guint32)info->timestamp);
++
+ if (!info)
+ {
+ /* FIXME */
@@ -1871,7 +1956,7 @@
+ }
+
+ output->name = g_strdup (info->name); /* FIXME: what is nameLen used for? */
-+ output->current_crtc = crtc_by_id (output->screen, info->crtc);
++ output->current_crtc = crtc_by_id (output->info, info->crtc);
+ output->width_mm = info->mm_width;
+ output->height_mm = info->mm_height;
+ output->connected = (info->connection == RR_Connected);
@@ -1881,7 +1966,7 @@
+
+ for (i = 0; i < info->ncrtc; ++i)
+ {
-+ RWCrtc *crtc = crtc_by_id (output->screen, info->crtcs[i]);
++ RWCrtc *crtc = crtc_by_id (output->info, info->crtcs[i]);
+
+ if (crtc)
+ g_ptr_array_add (a, crtc);
@@ -1893,7 +1978,7 @@
+ a = g_ptr_array_new ();
+ for (i = 0; i < info->nclone; ++i)
+ {
-+ RWOutput *output = rw_output_by_id (output->screen, info->clones[i]);
++ RWOutput *output = rw_output_by_id (output->info, info->clones[i]);
+
+ if (output)
+ g_ptr_array_add (a, output);
@@ -1905,7 +1990,7 @@
+ a = g_ptr_array_new ();
+ for (i = 0; i < info->nmode; ++i)
+ {
-+ RWMode *mode = mode_by_id (output->screen, info->modes[i]);
++ RWMode *mode = mode_by_id (output->info, info->modes[i]);
+
+ if (mode)
+ g_ptr_array_add (a, mode);
@@ -1945,9 +2030,9 @@
+{
+ int i;
+
-+ for (i = 0; screen->outputs[i] != NULL; ++i)
++ for (i = 0; screen->info->outputs[i] != NULL; ++i)
+ {
-+ RWOutput *output = screen->outputs[i];
++ RWOutput *output = screen->info->outputs[i];
+
+ if (strcmp (output->name, name) == 0)
+ return output;
@@ -2118,22 +2203,19 @@
+ RWOutput **outputs,
+ int n_outputs)
+{
-+ RWScreen *screen;
++ ScreenInfo *info;
+ GArray *output_ids;
+ int i;
+
+ g_return_val_if_fail (crtc != NULL, FALSE);
+ g_return_val_if_fail (mode != NULL || outputs == NULL || n_outputs == 0, FALSE);
+
-+ screen = crtc->screen;
-+
++ info = crtc->info;
++
+ if (mode)
+ {
-+#if 0
-+ g_print ("x: %d mode->width: %d max width: %d\n", x, mode->width, screen->max_width);
-+#endif
-+ g_return_val_if_fail (x + mode->width <= screen->max_width, FALSE);
-+ g_return_val_if_fail (y + mode->height <= screen->max_height, FALSE);
++ g_return_val_if_fail (x + mode->width <= info->max_width, FALSE);
++ g_return_val_if_fail (y + mode->height <= info->max_height, FALSE);
+ }
+
+ output_ids = g_array_new (FALSE, FALSE, sizeof (RROutput));
@@ -2144,7 +2226,7 @@
+ g_array_append_val (output_ids, outputs[i]->id);
+ }
+
-+ XRRSetCrtcConfig (screen->xdisplay, screen->resources, crtc->id,
++ XRRSetCrtcConfig (DISPLAY (crtc), info->resources, crtc->id,
+ CurrentTime,
+ x, y,
+ mode? mode->id : None,
@@ -2227,12 +2309,12 @@
+}
+
+static RWCrtc *
-+crtc_new (RWScreen *screen, RROutput id)
++crtc_new (ScreenInfo *info, RROutput id)
+{
+ RWCrtc *crtc = g_new0 (RWCrtc, 1);
+
+ crtc->id = id;
-+ crtc->screen = screen;
++ crtc->info = info;
+
+ return crtc;
+}
@@ -2240,10 +2322,12 @@
+static void
+crtc_initialize (RWCrtc *crtc, XRRScreenResources *res)
+{
-+ XRRCrtcInfo *info = XRRGetCrtcInfo (crtc->screen->xdisplay, res, crtc->id);
++ XRRCrtcInfo *info = XRRGetCrtcInfo (DISPLAY (crtc), res, crtc->id);
+ GPtrArray *a;
+ int i;
+
++ g_print ("CRTC %lx Timestamp: %u\n", crtc->id, (guint32)info->timestamp);
++
+ if (!info)
+ {
+ /* FIXME: We need to reaquire the screen resources */
@@ -2251,7 +2335,7 @@
+ }
+
+ /* RWMode */
-+ crtc->current_mode = mode_by_id (crtc->screen, info->mode);
++ crtc->current_mode = mode_by_id (crtc->info, info->mode);
+
+ crtc->x = info->x;
+ crtc->y = info->y;
@@ -2260,7 +2344,7 @@
+ a = g_ptr_array_new ();
+ for (i = 0; i < info->noutput; ++i)
+ {
-+ RWOutput *output = rw_output_by_id (crtc->screen, info->outputs[i]);
++ RWOutput *output = rw_output_by_id (crtc->info, info->outputs[i]);
+
+ if (output)
+ g_ptr_array_add (a, output);
@@ -2272,7 +2356,7 @@
+ a = g_ptr_array_new ();
+ for (i = 0; i < info->npossible; ++i)
+ {
-+ RWOutput *output = rw_output_by_id (crtc->screen, info->possible[i]);
++ RWOutput *output = rw_output_by_id (crtc->info, info->possible[i]);
+
+ if (output)
+ g_ptr_array_add (a, output);
@@ -2297,12 +2381,12 @@
+
+/* RWMode */
+static RWMode *
-+mode_new (RWScreen *screen, RRMode id)
++mode_new (ScreenInfo *info, RRMode id)
+{
+ RWMode *mode = g_new0 (RWMode, 1);
+
+ mode->id = id;
-+ mode->screen = screen;
++ mode->info = info;
+
+ return mode;
+}
@@ -2376,9 +2460,9 @@
+ on_screen_changed,
+ NULL);
+
-+ for (i = 0; screen->crtcs[i]; ++i)
++ for (i = 0; screen->info->crtcs[i]; ++i)
+ {
-+ RWCrtc *crtc = screen->crtcs[i];
++ RWCrtc *crtc = screen->info->crtcs[i];
+
+ if (crtc->current_mode)
+ {
@@ -2392,9 +2476,9 @@
+ }
+ }
+
-+ for (i = 0; screen->outputs[i]; ++i)
++ for (i = 0; screen->info->outputs[i]; ++i)
+ {
-+ RWOutput *output = screen->outputs[i];
++ RWOutput *output = screen->info->outputs[i];
+
+ g_print ("Output %s currently", output->name);
+
@@ -2413,7 +2497,7 @@
+#endif
diff -up gnome-desktop-2.21.91/libgnome-desktop/Makefile.am.add-randr-12 gnome-desktop-2.21.91/libgnome-desktop/Makefile.am
--- gnome-desktop-2.21.91/libgnome-desktop/Makefile.am.add-randr-12 2008-02-11 13:35:11.000000000 -0500
-+++ gnome-desktop-2.21.91/libgnome-desktop/Makefile.am 2008-02-13 10:37:10.000000000 -0500
++++ gnome-desktop-2.21.91/libgnome-desktop/Makefile.am 2008-02-13 10:51:26.000000000 -0500
@@ -20,7 +20,12 @@ libgnome_desktop_2_la_SOURCES = \
gnome-desktop-item.c \
gnome-ditem-edit.c \
@@ -2430,7 +2514,7 @@
$(XLIB_LIBS) \
diff -up /dev/null gnome-desktop-2.21.91/libgnome-desktop/edid-parse.c
--- /dev/null 2008-02-13 09:53:53.228642516 -0500
-+++ gnome-desktop-2.21.91/libgnome-desktop/edid-parse.c 2008-02-13 10:36:07.000000000 -0500
++++ gnome-desktop-2.21.91/libgnome-desktop/edid-parse.c 2008-02-15 20:28:36.000000000 -0500
@@ -0,0 +1,551 @@
+/*
+ * Copyright 2007 Red Hat, Inc.
@@ -2985,7 +3069,7 @@
+}
diff -up /dev/null gnome-desktop-2.21.91/libgnome-desktop/edid.h
--- /dev/null 2008-02-13 09:53:53.228642516 -0500
-+++ gnome-desktop-2.21.91/libgnome-desktop/edid.h 2008-02-13 10:36:07.000000000 -0500
++++ gnome-desktop-2.21.91/libgnome-desktop/edid.h 2008-02-15 20:28:36.000000000 -0500
@@ -0,0 +1,170 @@
+typedef unsigned char uchar;
+typedef struct MonitorInfo MonitorInfo;
@@ -3159,7 +3243,7 @@
+ const MonitorInfo *info);
diff -up /dev/null gnome-desktop-2.21.91/libgnome-desktop/display-name.c
--- /dev/null 2008-02-13 09:53:53.228642516 -0500
-+++ gnome-desktop-2.21.91/libgnome-desktop/display-name.c 2008-02-13 10:36:07.000000000 -0500
++++ gnome-desktop-2.21.91/libgnome-desktop/display-name.c 2008-02-15 20:28:36.000000000 -0500
@@ -0,0 +1,193 @@
+/*
+ * Copyright 2007 Red Hat, Inc.
Index: gnome-desktop.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-desktop/devel/gnome-desktop.spec,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -r1.124 -r1.125
--- gnome-desktop.spec 15 Feb 2008 15:28:14 -0000 1.124
+++ gnome-desktop.spec 16 Feb 2008 01:38:09 -0000 1.125
@@ -12,7 +12,7 @@
Summary: Package containing code shared among gnome-panel, gnome-session, nautilus, etc
Name: gnome-desktop
Version: 2.21.91
-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+
@@ -119,6 +119,9 @@
%doc %{_datadir}/gtk-doc/html/gnome-desktop/
%changelog
+* Fri Feb 15 2008 Soren Sandmann <sandmann at redhat.com> - 2.21.91-5
+* Update randr code
+
* Wed Feb 13 2008 Soren Sandmann <sandmann at redhat.com> - 2.21.91-4
- Update randrwrap
- Previous message (by thread): rpms/kdeadmin/F-8 .cvsignore, 1.37, 1.38 kdeadmin.spec, 1.80, 1.81 sources, 1.39, 1.40
- Next message (by thread): rpms/control-center/devel add-randr12-capplet.patch, 1.10, 1.11 control-center.spec, 1.340, 1.341
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list