diff --git a/clone-modes.patch b/clone-modes.patch deleted file mode 100644 index 35fb92e..0000000 --- a/clone-modes.patch +++ /dev/null @@ -1,431 +0,0 @@ -diff -up gnome-desktop-2.24.0/libgnome-desktop/gnome-rr.c.clone-modes gnome-desktop-2.24.0/libgnome-desktop/gnome-rr.c ---- gnome-desktop-2.24.0/libgnome-desktop/gnome-rr.c.clone-modes 2008-09-24 14:09:09.000000000 -0400 -+++ gnome-desktop-2.24.0/libgnome-desktop/gnome-rr.c 2008-09-24 14:09:09.000000000 -0400 -@@ -50,6 +50,8 @@ struct ScreenInfo - GnomeRRMode ** modes; - - GnomeRRScreen * screen; -+ -+ GnomeRRMode ** clone_modes; - }; - - struct GnomeRRScreen -@@ -222,11 +224,86 @@ screen_info_free (ScreenInfo *info) - mode_free (*mode); - g_free (info->modes); - } -+ -+ if (info->clone_modes) -+ { -+ /* The modes themselves were freed above */ -+ g_free (info->clone_modes); -+ } - - g_free (info); - } - - static gboolean -+has_similar_mode (GnomeRROutput *output, GnomeRRMode *mode) -+{ -+ int i; -+ GnomeRRMode **modes = gnome_rr_output_list_modes (output); -+ int width = gnome_rr_mode_get_width (mode); -+ int height = gnome_rr_mode_get_height (mode); -+ -+ for (i = 0; modes[i] != NULL; ++i) -+ { -+ GnomeRRMode *m = modes[i]; -+ -+ if (gnome_rr_mode_get_width (m) == width && -+ gnome_rr_mode_get_height (m) == height) -+ { -+ return TRUE; -+ } -+ } -+ -+ return FALSE; -+} -+ -+static void -+gather_clone_modes (ScreenInfo *info) -+{ -+ int i; -+ GPtrArray *result = g_ptr_array_new (); -+ -+ for (i = 0; info->outputs[i] != NULL; ++i) -+ { -+ int j; -+ GnomeRROutput *output1, *output2; -+ -+ output1 = info->outputs[i]; -+ -+ if (!output1->connected) -+ continue; -+ -+ for (j = 0; output1->modes[j] != NULL; ++j) -+ { -+ GnomeRRMode *mode = output1->modes[j]; -+ gboolean valid; -+ int k; -+ -+ valid = TRUE; -+ for (k = 0; info->outputs[k] != NULL; ++k) -+ { -+ output2 = info->outputs[k]; -+ -+ if (!output2->connected) -+ continue; -+ -+ if (!has_similar_mode (output2, mode)) -+ { -+ valid = FALSE; -+ break; -+ } -+ } -+ -+ if (valid) -+ g_ptr_array_add (result, mode); -+ } -+ } -+ -+ g_ptr_array_add (result, NULL); -+ -+ info->clone_modes = (GnomeRRMode **)g_ptr_array_free (result, FALSE); -+} -+ -+static gboolean - fill_out_screen_info (Display *xdisplay, - Window xroot, - ScreenInfo *info) -@@ -322,6 +399,8 @@ fill_out_screen_info (Display *xdisplay, - - mode_initialize (mode, &(resources->modes[i])); - } -+ -+ gather_clone_modes (info); - - return TRUE; - } -@@ -526,6 +605,15 @@ gnome_rr_screen_list_modes (GnomeRRScree - return screen->info->modes; - } - -+GnomeRRMode ** -+gnome_rr_screen_list_clone_modes (GnomeRRScreen *screen) -+{ -+ g_return_val_if_fail (screen != NULL, NULL); -+ g_return_val_if_fail (screen->info != NULL, NULL); -+ -+ return screen->info->clone_modes; -+} -+ - GnomeRRCrtc ** - gnome_rr_screen_list_crtcs (GnomeRRScreen *screen) - { -diff -up gnome-desktop-2.24.0/libgnome-desktop/gnome-rr-config.c.clone-modes gnome-desktop-2.24.0/libgnome-desktop/gnome-rr-config.c ---- gnome-desktop-2.24.0/libgnome-desktop/gnome-rr-config.c.clone-modes 2008-09-24 14:09:09.000000000 -0400 -+++ gnome-desktop-2.24.0/libgnome-desktop/gnome-rr-config.c 2008-09-24 14:11:34.000000000 -0400 -@@ -748,6 +748,42 @@ output_match (GnomeOutputInfo *output1, - return TRUE; - } - -+static gboolean -+output_equal (GnomeOutputInfo *output1, GnomeOutputInfo *output2) -+{ -+ g_assert (output1 != NULL); -+ g_assert (output2 != NULL); -+ -+ if (!output_match (output1, output2)) -+ return FALSE; -+ -+ if (output1->on != output2->on) -+ return FALSE; -+ -+ if (output1->on) -+ { -+ if (output1->width != output2->width) -+ return FALSE; -+ -+ if (output1->height != output2->height) -+ return FALSE; -+ -+ if (output1->rate != output2->rate) -+ return FALSE; -+ -+ if (output1->x != output2->x) -+ return FALSE; -+ -+ if (output1->y != output2->y) -+ return FALSE; -+ -+ if (output1->rotation != output2->rotation) -+ return FALSE; -+ } -+ -+ return TRUE; -+} -+ - static GnomeOutputInfo * - find_output (GnomeRRConfig *config, const char *name) - { -@@ -764,6 +800,9 @@ find_output (GnomeRRConfig *config, cons - return NULL; - } - -+/* Match means "these configurations apply to the same hardware -+ * setups" -+ */ - gboolean - gnome_rr_config_match (GnomeRRConfig *c1, GnomeRRConfig *c2) - { -@@ -782,6 +821,28 @@ gnome_rr_config_match (GnomeRRConfig *c1 - return TRUE; - } - -+/* Equal means "the configurations will result in the same -+ * modes being set on the outputs" -+ */ -+gboolean -+gnome_rr_config_equal (GnomeRRConfig *c1, -+ GnomeRRConfig *c2) -+{ -+ int i; -+ -+ for (i = 0; c1->outputs[i] != NULL; ++i) -+ { -+ GnomeOutputInfo *output1 = c1->outputs[i]; -+ GnomeOutputInfo *output2; -+ -+ output2 = find_output (c2, output1->name); -+ if (!output2 || !output_equal (output1, output2)) -+ return FALSE; -+ } -+ -+ return TRUE; -+} -+ - static GnomeOutputInfo ** - make_outputs (GnomeRRConfig *config) - { -@@ -843,21 +904,6 @@ gnome_rr_config_applicable (GnomeRRConfi - return result; - } - --static GnomeRRConfig * --gnome_rr_config_find (GnomeRRConfig **haystack, -- GnomeRRConfig *needle) --{ -- int i; -- -- for (i = 0; haystack[i] != NULL; ++i) -- { -- if (gnome_rr_config_match (haystack[i], needle)) -- return haystack[i]; -- } -- -- return NULL; --} -- - /* Database management */ - - static gchar * -@@ -1039,14 +1085,69 @@ gnome_rr_config_save (GnomeRRConfig *con - return result; - } - --static gboolean --apply_configuration (GnomeRRConfig *conf, GnomeRRScreen *screen) -+static GnomeRRConfig * -+gnome_rr_config_copy (GnomeRRConfig *config) -+{ -+ GnomeRRConfig *copy = g_new0 (GnomeRRConfig, 1); -+ int i; -+ GPtrArray *array = g_ptr_array_new (); -+ -+ copy->clone = config->clone; -+ -+ for (i = 0; config->outputs[i] != NULL; ++i) -+ g_ptr_array_add (array, output_copy (config->outputs[i])); -+ -+ g_ptr_array_add (array, NULL); -+ copy->outputs = (GnomeOutputInfo **)g_ptr_array_free (array, FALSE); -+ -+ return copy; -+} -+ -+GnomeRRConfig * -+gnome_rr_config_new_stored (GnomeRRScreen *screen) -+{ -+ GnomeRRConfig *current; -+ GnomeRRConfig **configs; -+ GnomeRRConfig *result; -+ -+ if (!screen) -+ return NULL; -+ -+ current = gnome_rr_config_new_current (screen); -+ -+ configs = configurations_read (NULL); /* NULL_GError */ -+ -+ result = NULL; -+ if (configs) -+ { -+ int i; -+ -+ for (i = 0; configs[i] != NULL; ++i) -+ { -+ if (gnome_rr_config_match (configs[i], current)) -+ { -+ result = gnome_rr_config_copy (configs[i]); -+ break; -+ } -+ } -+ -+ configurations_free (configs); -+ } -+ -+ gnome_rr_config_free (current); -+ -+ return result; -+} -+ -+gboolean -+gnome_rr_config_apply (GnomeRRConfig *config, -+ GnomeRRScreen *screen) - { - CrtcAssignment *assignment; - GnomeOutputInfo **outputs; - gboolean result = FALSE; - -- outputs = make_outputs (conf); -+ outputs = make_outputs (config); - - assignment = crtc_assignment_new (screen, outputs); - -@@ -1068,42 +1169,51 @@ apply_configuration (GnomeRRConfig *conf - gboolean - gnome_rr_config_apply_stored (GnomeRRScreen *screen) - { -- GnomeRRConfig **configs; -- GnomeRRConfig *current; -- GnomeRRConfig *found; -- gboolean result = TRUE; -+ GnomeRRConfig *stored; - - if (!screen) - return FALSE; - -- configs = configurations_read (NULL); /* NULL-GError */ -- - gnome_rr_screen_refresh (screen); -- -- current = gnome_rr_config_new_current (screen); - -- if (configs) -+ stored = gnome_rr_config_new_stored (screen); -+ -+ if (stored) - { -- if ((found = gnome_rr_config_find (configs, current))) -- { -- apply_configuration (found, screen); -+ gnome_rr_config_apply (stored, screen); - -- result = TRUE; -- } -- else -+ gnome_rr_config_free (stored); -+ -+ return TRUE; -+ } -+ else -+ { -+ return FALSE; -+ } -+} -+ -+static gboolean -+has_similar_mode (GnomeRROutput *output, GnomeRRMode *mode) -+{ -+ int i; -+ GnomeRRMode **modes = gnome_rr_output_list_modes (output); -+ int width = gnome_rr_mode_get_width (mode); -+ int height = gnome_rr_mode_get_height (mode); -+ -+ for (i = 0; modes[i] != NULL; ++i) -+ { -+ GnomeRRMode *m = modes[i]; -+ -+ if (gnome_rr_mode_get_width (m) == width && -+ gnome_rr_mode_get_height (m) == height) - { -- result = FALSE; -+ return TRUE; - } -- -- configurations_free (configs); - } -- -- gnome_rr_config_free (current); - -- return result; -+ return FALSE; - } - -- - /* - * CRTC assignment - */ -diff -up gnome-desktop-2.24.0/libgnome-desktop/libgnomeui/gnome-rr-config.h.clone-modes gnome-desktop-2.24.0/libgnome-desktop/libgnomeui/gnome-rr-config.h ---- gnome-desktop-2.24.0/libgnome-desktop/libgnomeui/gnome-rr-config.h.clone-modes 2008-09-22 17:01:45.000000000 -0400 -+++ gnome-desktop-2.24.0/libgnome-desktop/libgnomeui/gnome-rr-config.h 2008-09-24 14:09:09.000000000 -0400 -@@ -34,6 +34,13 @@ - typedef struct GnomeOutputInfo GnomeOutputInfo; - typedef struct GnomeRRConfig GnomeRRConfig; - -+/* FIXME: -+ * -+ * This structure is a Frankenstein monster where all of the fields -+ * are generated by the system, but some of them can be changed by -+ * the client. -+ */ -+ - struct GnomeOutputInfo - { - char * name; -@@ -66,14 +73,24 @@ struct GnomeRRConfig - }; - - GnomeRRConfig *gnome_rr_config_new_current (GnomeRRScreen *screen); -+GnomeRRConfig *gnome_rr_config_new_stored (GnomeRRScreen *screen); - void gnome_rr_config_free (GnomeRRConfig *configuration); - gboolean gnome_rr_config_match (GnomeRRConfig *config1, - GnomeRRConfig *config2); -+gboolean gnome_rr_config_equal (GnomeRRConfig *config1, -+ GnomeRRConfig *config2); - gboolean gnome_rr_config_save (GnomeRRConfig *configuration, - GError **err); - void gnome_rr_config_sanitize (GnomeRRConfig *configuration); -+gboolean gnome_rr_config_apply (GnomeRRConfig *configuration, -+ GnomeRRScreen *screen); - gboolean gnome_rr_config_apply_stored (GnomeRRScreen *screen); - gboolean gnome_rr_config_applicable (GnomeRRConfig *configuration, - GnomeRRScreen *screen); - -+/* A utility function that isn't really in the spirit of this file, but I don't -+ * don't know a better place for it. -+ */ -+GnomeRRMode **gnome_rr_create_clone_modes (GnomeRRScreen *screen); -+ - #endif -diff -up gnome-desktop-2.24.0/libgnome-desktop/libgnomeui/gnome-rr.h.clone-modes gnome-desktop-2.24.0/libgnome-desktop/libgnomeui/gnome-rr.h ---- gnome-desktop-2.24.0/libgnome-desktop/libgnomeui/gnome-rr.h.clone-modes 2008-09-22 17:01:45.000000000 -0400 -+++ gnome-desktop-2.24.0/libgnome-desktop/libgnomeui/gnome-rr.h 2008-09-24 14:09:09.000000000 -0400 -@@ -56,6 +56,7 @@ void gnome_rr_screen_destroy - GnomeRROutput **gnome_rr_screen_list_outputs (GnomeRRScreen *screen); - GnomeRRCrtc ** gnome_rr_screen_list_crtcs (GnomeRRScreen *screen); - GnomeRRMode ** gnome_rr_screen_list_modes (GnomeRRScreen *screen); -+GnomeRRMode ** gnome_rr_screen_list_clone_modes (GnomeRRScreen *screen); - void gnome_rr_screen_set_size (GnomeRRScreen *screen, - int width, - int height, diff --git a/concatenate-edid-descriptors.patch b/concatenate-edid-descriptors.patch deleted file mode 100644 index 6ca8a3a..0000000 --- a/concatenate-edid-descriptors.patch +++ /dev/null @@ -1,138 +0,0 @@ -commit c047e42269ee05e0ae7ef62778e960e4b94a121f -Author: Matthias Clasen -Date: Tue Mar 9 11:01:14 2010 +0000 - - Don't use fixed-length arrays for EDID - - Use variable-length variables instead. - - https://bugzilla.gnome.org/show_bug.cgi?id=612276 - -diff --git a/libgnome-desktop/edid-parse.c b/libgnome-desktop/edid-parse.c -index 225778a..ef00682 100644 ---- a/libgnome-desktop/edid-parse.c -+++ b/libgnome-desktop/edid-parse.c -@@ -349,27 +349,44 @@ decode_standard_timings (const uchar *edid, MonitorInfo *info) - return TRUE; - } - --static void --decode_lf_string (const uchar *s, int n_chars, char *result) -+static char * -+decode_lf_string (const uchar *s, int n_chars, char *prev) - { - int i; -+ char *ret, *tmp; -+ -+ tmp = g_malloc0 (n_chars); -+ - for (i = 0; i < n_chars; ++i) - { - if (s[i] == 0x0a) - { -- *result++ = '\0'; -+ tmp[i] = '\0'; - break; - } - else if (s[i] == 0x00) - { - /* Convert embedded 0's to spaces */ -- *result++ = ' '; -+ tmp[i] = ' '; - } - else - { -- *result++ = s[i]; -+ tmp[i] = s[i]; - } - } -+ -+ if (prev) -+ { -+ ret = g_strjoin(NULL, prev, tmp, NULL); -+ g_free(prev); -+ g_free(tmp); -+ } -+ else -+ { -+ ret = tmp; -+ } -+ -+ return ret; - } - - static void -@@ -379,13 +396,16 @@ decode_display_descriptor (const uchar *desc, - switch (desc[0x03]) - { - case 0xFC: -- decode_lf_string (desc + 5, 13, info->dsc_product_name); -+ info->dsc_product_name = decode_lf_string (desc + 5, 13, -+ info->dsc_product_name); - break; - case 0xFF: -- decode_lf_string (desc + 5, 13, info->dsc_serial_number); -+ info->dsc_serial_number = decode_lf_string (desc + 5, 13, -+ info->dsc_serial_number); - break; - case 0xFE: -- decode_lf_string (desc + 5, 13, info->dsc_string); -+ info->dsc_string = decode_lf_string (desc + 5, 13, -+ info->dsc_string); - break; - case 0xFD: - /* Range Limits */ -@@ -514,6 +534,18 @@ decode_check_sum (const uchar *edid, - info->checksum = check; - } - -+void -+free_edid (MonitorInfo *info) -+{ -+ if (info) -+ { -+ g_free (info->dsc_product_name); -+ g_free (info->dsc_serial_number); -+ g_free (info->dsc_string); -+ } -+ g_free (info); -+} -+ - MonitorInfo * - decode_edid (const uchar *edid) - { -diff --git a/libgnome-desktop/edid.h b/libgnome-desktop/edid.h -index 55f0bfa..dbfd83c 100644 ---- a/libgnome-desktop/edid.h -+++ b/libgnome-desktop/edid.h -@@ -183,12 +183,13 @@ struct MonitorInfo - */ - - /* Optional product description */ -- char dsc_serial_number[14]; -- char dsc_product_name[14]; -- char dsc_string[14]; /* Unspecified ASCII data */ -+ char *dsc_serial_number; -+ char *dsc_product_name; -+ char *dsc_string; /* Unspecified ASCII data */ - }; - - MonitorInfo *decode_edid (const uchar *data); --char *make_display_name (const MonitorInfo *info); -+void free_edid (MonitorInfo *); -+char * make_display_name (const MonitorInfo *info); - - #endif -diff --git a/libgnome-desktop/gnome-rr-config.c b/libgnome-desktop/gnome-rr-config.c -index 5568fe2..6a81a61 100644 ---- a/libgnome-desktop/gnome-rr-config.c -+++ b/libgnome-desktop/gnome-rr-config.c -@@ -501,7 +501,7 @@ gnome_rr_config_new_current (GnomeRRScreen *screen) - else - output->display_name = make_display_name (info); - -- g_free (info); -+ free_edid (info); - - crtc = gnome_rr_output_get_crtc (rr_output); - mode = crtc? gnome_rr_crtc_get_current_mode (crtc) : NULL; diff --git a/gnome-desktop-2.27.3-edid-prop-name.patch b/gnome-desktop-2.27.3-edid-prop-name.patch deleted file mode 100644 index 4f53280..0000000 --- a/gnome-desktop-2.27.3-edid-prop-name.patch +++ /dev/null @@ -1,38 +0,0 @@ -commit d9f0cca94f16628cb273cadfe25bd5998ac3c178 -Author: Adam Jackson -Date: Tue Jul 7 18:20:12 2009 -0400 - - Adapt to RANDR 1.3's name for the EDID property. - - 1.2 calls it EDID_DATA, 1.3 calls it EDID. Try the 1.3 name first since - 1.2 will eventually be rare. - -diff --git a/libgnome-desktop/gnome-rr.c b/libgnome-desktop/gnome-rr.c -index a3a8b2c..b788600 100644 ---- a/libgnome-desktop/gnome-rr.c -+++ b/libgnome-desktop/gnome-rr.c -@@ -866,13 +866,21 @@ get_property (Display *dpy, - static guint8 * - read_edid_data (GnomeRROutput *output) - { -- Atom edid_atom = XInternAtom (DISPLAY (output), "EDID_DATA", FALSE); -+ Atom edid_atom; - guint8 *result; - int len; -- -+ -+ edid_atom = XInternAtom (DISPLAY (output), "EDID", FALSE); - result = get_property (DISPLAY (output), - output->id, edid_atom, &len); -- -+ -+ if (!result) -+ { -+ edid_atom = XInternAtom (DISPLAY (output), "EDID_DATA", FALSE); -+ result = get_property (DISPLAY (output), -+ output->id, edid_atom, &len); -+ } -+ - if (result) - { - if (len % 128 == 0) diff --git a/gnome-desktop.spec b/gnome-desktop.spec index 2d979c5..d59aa71 100644 --- a/gnome-desktop.spec +++ b/gnome-desktop.spec @@ -12,12 +12,10 @@ Summary: Shared code among gnome-panel, gnome-session, nautilus, etc Name: gnome-desktop Version: 2.31.2 -Release: 2%{?dist} +Release: 3%{?dist} URL: http://www.gnome.org #VCS: git:git://git.gnome.org/gnome-desktop Source0: http://download.gnome.org/sources/gnome-desktop/2.31/%{name}-%{version}.tar.bz2 -# https://bugzilla.gnome.org/show_bug.cgi?id=612276 -Patch1: concatenate-edid-descriptors.patch License: GPLv2+ and LGPLv2+ Group: System Environment/Libraries @@ -76,8 +74,6 @@ libgnomedesktop. %prep %setup -q -%patch1 -p1 -b .concatenate-edid-descriptors - %build %configure --with-gnome-distributor="Red Hat, Inc" \ @@ -120,6 +116,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.a %doc %{_datadir}/gtk-doc/html/gnome-desktop/ %changelog +* Sun Jun 13 2010 Bastien Nocera 2.31.2-3 +- Remove obsolete patch + * Tue Jun 1 2010 Matthias Clasen - 2.31.2-2 - Update artwork deps to match F13 diff --git a/width-for-height.patch b/width-for-height.patch deleted file mode 100644 index aecede8..0000000 --- a/width-for-height.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up gnome-desktop-2.28.2/libgnome-desktop/gnome-bg.c.width-for-height gnome-desktop-2.28.2/libgnome-desktop/gnome-bg.c ---- gnome-desktop-2.28.2/libgnome-desktop/gnome-bg.c.width-for-height 2010-04-21 12:40:03.985111930 -0400 -+++ gnome-desktop-2.28.2/libgnome-desktop/gnome-bg.c 2010-04-21 12:40:12.654363778 -0400 -@@ -1257,7 +1257,7 @@ gnome_bg_get_pixmap_from_root (GdkScreen - } - - width = gdk_screen_get_width (screen); -- height = gdk_screen_get_width (screen); -+ height = gdk_screen_get_height (screen); - - pixmap = gdk_pixmap_new (source_pixmap != NULL? source_pixmap : - gdk_screen_get_root_window (screen),