rpms/gnome-desktop/F-9 add-randr-12.patch, 1.17, 1.18 gnome-desktop.spec, 1.140, 1.141
Soren Sandmann Pedersen (ssp)
fedora-extras-commits at redhat.com
Fri Apr 25 04:58:07 UTC 2008
Author: ssp
Update of /cvs/pkgs/rpms/gnome-desktop/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15008
Modified Files:
add-randr-12.patch gnome-desktop.spec
Log Message:
Integrate NULL pointer fixes from other distributions
add-randr-12.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.17 -r 1.18 add-randr-12.patch
Index: add-randr-12.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-desktop/F-9/add-randr-12.patch,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- add-randr-12.patch 9 Apr 2008 03:50:50 -0000 1.17
+++ add-randr-12.patch 25 Apr 2008 04:57:29 -0000 1.18
@@ -1,1395 +1,1068 @@
-diff -up /dev/null gnome-desktop-2.22.1/libgnome-desktop/randrwrap.c
---- /dev/null 2008-03-16 00:14:46.954006998 -0400
-+++ gnome-desktop-2.22.1/libgnome-desktop/randrwrap.c 2008-04-08 23:39:06.000000000 -0400
-@@ -0,0 +1,1124 @@
-+#define I_KNOW_THIS_IS_UNSTABLE_AND_ONLY_IN_FEDORA
-+#include "libgnomeui/randrwrap.h"
-+#include <string.h>
-+#include <X11/Xlib.h>
-+#include <X11/extensions/Xrandr.h>
-+#include <gtk/gtk.h>
-+#include <gdk/gdkx.h>
-+#include <X11/Xatom.h>
-+
-+#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;
-+
-+ 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;
+diff --git a/configure.in b/configure.in
+index f18ad7b..5b0202b 100644
+--- a/configure.in
++++ b/configure.in
+@@ -51,10 +51,10 @@ AC_SUBST(GNOME_MICRO)
+ AC_SUBST(GNOME_DISTRIBUTOR)
+ AC_SUBST(GNOME_DATE)
+
+-GNOME_COMMON_INIT
+-GNOME_DEBUG_CHECK
+-GNOME_COMPILE_WARNINGS([maximum])
+-GNOME_MAINTAINER_MODE_DEFINES
++#GNOME_COMMON_INIT
++#GNOME_DEBUG_CHECK
++#GNOME_COMPILE_WARNINGS([maximum])
++#GNOME_MAINTAINER_MODE_DEFINES
+
+ # As a special favour for vuntz, support --disable-deprecations
+
+diff --git a/libgnome-desktop/ChangeLog b/libgnome-desktop/ChangeLog
+index a6a4486..bc95a61 100644
+--- a/libgnome-desktop/ChangeLog
++++ b/libgnome-desktop/ChangeLog
+@@ -1,3 +1,10 @@
++2008-04-17 James Westby <james.westby at canonical.com>
++
++ * monitor-db.c (configuration_new_current): Invert the logic in
++ the detection of clone mode so that it works for a single screen
++ as well. Without this change single screens are always reported as
++ clone, which makes no sense.
+
-+ RWScreenChanged callback;
-+ gpointer data;
-+};
+ 2008-03-29 Matthias Clasen <mclasen at redhat.com>
+
+ * gnome-bg.c (get_current_slide): Handle start times in
+diff --git a/libgnome-desktop/Makefile.am b/libgnome-desktop/Makefile.am
+index 08e1395..68bf653 100644
+--- a/libgnome-desktop/Makefile.am
++++ b/libgnome-desktop/Makefile.am
+@@ -20,7 +20,12 @@ libgnome_desktop_2_la_SOURCES = \
+ gnome-desktop-item.c \
+ gnome-ditem-edit.c \
+ gnome-hint.c \
+- gnome-bg.c
++ gnome-bg.c \
++ display-name.c \
++ randrwrap.c \
++ monitor-db.c \
++ edid-parse.c \
++ edid.h
+
+ libgnome_desktop_2_la_LIBADD = \
+ $(XLIB_LIBS) \
+diff --git a/libgnome-desktop/display-name.c b/libgnome-desktop/display-name.c
+new file mode 100644
+index 0000000..5c46920
+--- /dev/null
++++ b/libgnome-desktop/display-name.c
+@@ -0,0 +1,252 @@
++/*
++ * Copyright 2007 Red Hat, Inc.
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * on the rights to use, copy, modify, merge, publish, distribute, sub
++ * license, and/or sell copies of the Software, and to permit persons to whom
++ * the Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the next
++ * paragraph) shall be included in all copies or substantial portions of the
++ * Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
++ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++ */
+
-+struct RWOutput
-+{
-+ ScreenInfo * info;
-+ RROutput id;
-+
-+ char * name;
-+ RWCrtc * current_crtc;
-+ gboolean connected;
-+ gulong width_mm;
-+ gulong height_mm;
-+ RWCrtc ** possible_crtcs;
-+ RWOutput ** clones;
-+ RWMode ** modes;
-+ int n_preferred;
-+ guint8 * edid_data;
-+};
++/* Author: Soren Sandmann <sandmann at redhat.com> */
+
-+struct RWOutputWrap
-+{
-+ RROutput id;
-+};
++#include <stdlib.h>
++#include <math.h>
++#include <stdio.h>
++#include <string.h>
++#include <glib.h>
++#include "edid.h"
+
-+struct RWCrtc
++typedef struct Vendor Vendor;
++struct Vendor
+{
-+ ScreenInfo * info;
-+ RRCrtc id;
-+
-+ RWMode * current_mode;
-+ RWOutput ** current_outputs;
-+ RWOutput ** possible_outputs;
-+ int x;
-+ int y;
-+
-+ RWRotation current_rotation;
-+ RWRotation rotations;
++ const char vendor_id[4];
++ const char vendor_name[28];
+};
+
-+struct RWMode
++/* This list of vendor codes derived from lshw
++ *
++ * http://ezix.org/project/wiki/HardwareLiSter
++ */
++static const struct Vendor vendors[] =
+{
-+ ScreenInfo * info;
-+ RRMode id;
-+ char * name;
-+ int width;
-+ int height;
-+ int freq; /* in mHz */
-+};
-+
-+/* RWCrtc */
-+static RWCrtc * crtc_new (ScreenInfo *info,
[...5082 lines suppressed...]
++static void
++mode_free (RWMode *mode)
+{
-+ int pixel_clock;
-+ int h_addr;
-+ int h_blank;
-+ int h_sync;
-+ int h_front_porch;
-+ int v_addr;
-+ int v_blank;
-+ int v_sync;
-+ int v_front_porch;
-+ int width_mm;
-+ int height_mm;
-+ int right_border;
-+ int top_border;
-+ int interlaced;
-+ StereoType stereo;
++ g_free (mode->name);
++ g_free (mode);
++}
+
-+ int digital_sync;
-+ union
-+ {
-+ struct
-+ {
-+ int bipolar;
-+ int serrations;
-+ int sync_on_green;
-+ } analog;
+
-+ struct
-+ {
-+ int composite;
-+ int serrations;
-+ int negative_vsync;
-+ int negative_hsync;
-+ } digital;
-+ };
-+};
++#ifdef INCLUDE_MAIN
++static void
++on_screen_changed (RWScreen *screen, gpointer data)
++{
++ g_print ("Changed\n");
++}
+
-+struct MonitorInfo
++static gboolean
++do_refresh (gpointer data)
+{
-+ int checksum;
-+ char manufacturer_code[4];
-+ int product_code;
-+ unsigned int serial_number;
-+
-+ int production_week; /* -1 if not specified */
-+ int production_year; /* -1 if not specified */
-+ int model_year; /* -1 if not specified */
++ RWScreen *screen = data;
+
-+ int major_version;
-+ int minor_version;
++ rw_screen_refresh (screen);
+
-+ int is_digital;
++ return TRUE;
++}
++
++int
++main (int argc, char **argv)
++{
++ int i;
+
-+ union
++ gtk_init (&argc, &argv);
++
++ RWScreen *screen = rw_screen_new (gdk_screen_get_default(),
++ on_screen_changed,
++ NULL);
++
++ for (i = 0; screen->info->crtcs[i]; ++i)
+ {
-+ struct
++ RWCrtc *crtc = screen->info->crtcs[i];
++
++ if (crtc->current_mode)
+ {
-+ int bits_per_primary;
-+ Interface interface;
-+ int rgb444;
-+ int ycrcb444;
-+ int ycrcb422;
-+ } digital;
-+
-+ struct
++ g_print ("CRTC %p: (%d %d %d %d)\n",
++ crtc, crtc->x, crtc->y,
++ crtc->current_mode->width, crtc->current_mode->height);
++ }
++ else
+ {
-+ double video_signal_level;
-+ double sync_signal_level;
-+ double total_signal_level;
-+
-+ int blank_to_black;
-+
-+ int separate_hv_sync;
-+ int composite_sync_on_h;
-+ int composite_sync_on_green;
-+ int serration_on_vsync;
-+ ColorType color_type;
-+ } analog;
-+ };
-+
-+ int width_mm; /* -1 if not specified */
-+ int height_mm; /* -1 if not specified */
-+ double aspect_ratio; /* -1.0 if not specififed */
-+
-+ double gamma; /* -1.0 if not specified */
-+
-+ int standby;
-+ int suspend;
-+ int active_off;
-+
-+ int srgb_is_standard;
-+ int preferred_timing_includes_native;
-+ int continuous_frequency;
-+
-+ double red_x;
-+ double red_y;
-+ double green_x;
-+ double green_y;
-+ double blue_x;
-+ double blue_y;
-+ double white_x;
-+ double white_y;
-+
-+ Timing established[24]; /* Terminated by 0x0x0 */
-+ Timing standard[8];
++ g_print ("CRTC %p: turned off\n", crtc);
++ }
++ }
+
-+ int n_detailed_timings;
-+ DetailedTiming detailed_timings[4]; /* If monitor has a preferred
-+ * mode, it is the first one
-+ * (whether it has, is
-+ * determined by the
-+ * preferred_timing_includes
-+ * bit.
-+ */
-+
-+ /* Optional product description */
-+ char dsc_serial_number[14];
-+ char dsc_product_name[14];
-+ char dsc_string[14]; /* Unspecified ASCII data */
-+};
++ for (i = 0; screen->info->outputs[i]; ++i)
++ {
++ RWOutput *output = screen->info->outputs[i];
++
++ g_print ("Output %s currently", output->name);
++
++ if (!output->current_crtc)
++ g_print (" turned off\n");
++ else
++ g_print (" driven by CRTC %p\n", output->current_crtc);
++ }
+
-+MonitorInfo *decode_edid (const uchar *data);
-+char * make_display_name (const char *output_name,
-+ const MonitorInfo *info);
-diff -up gnome-desktop-2.22.1/configure.in.add-randr-12 gnome-desktop-2.22.1/configure.in
---- gnome-desktop-2.22.1/configure.in.add-randr-12 2008-04-07 17:27:00.000000000 -0400
-+++ gnome-desktop-2.22.1/configure.in 2008-04-08 23:39:06.000000000 -0400
-@@ -51,10 +51,10 @@ AC_SUBST(GNOME_MICRO)
- AC_SUBST(GNOME_DISTRIBUTOR)
- AC_SUBST(GNOME_DATE)
-
--GNOME_COMMON_INIT
--GNOME_DEBUG_CHECK
--GNOME_COMPILE_WARNINGS([maximum])
--GNOME_MAINTAINER_MODE_DEFINES
-+#GNOME_COMMON_INIT
-+#GNOME_DEBUG_CHECK
-+#GNOME_COMPILE_WARNINGS([maximum])
-+#GNOME_MAINTAINER_MODE_DEFINES
-
- # As a special favour for vuntz, support --disable-deprecations
-
++ g_timeout_add (500, do_refresh, screen);
++
++ gtk_main ();
++
++ return 0;
++}
++#endif
Index: gnome-desktop.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-desktop/F-9/gnome-desktop.spec,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -r1.140 -r1.141
--- gnome-desktop.spec 9 Apr 2008 03:50:50 -0000 1.140
+++ gnome-desktop.spec 25 Apr 2008 04:57:29 -0000 1.141
@@ -12,7 +12,7 @@
Summary: Package containing code shared among gnome-panel, gnome-session, nautilus, etc
Name: gnome-desktop
Version: 2.22.1
-Release: 2%{?dist}
+Release: 3%{?dist}
URL: http://www.gnome.org
Source0: http://download.gnome.org/sources/gnome-desktop/2.22/%{name}-%{version}.tar.bz2
License: GPLv2+ and LGPLv2+
@@ -126,6 +126,9 @@
%doc %{_datadir}/gtk-doc/html/gnome-desktop/
%changelog
+* Fri Apr 25 2008 Soren Sandmann <sandmann at redhat.com> - 2.22.1-3
+- Integrate a number of fixes from other distributions
+
* Tue Apr 8 2008 Soren Sandmann <sandmann at redhat.com> - 2.22.1-2
- Fix bug where the dpi of the screen got miscalculated
More information about the scm-commits
mailing list