From 3330a492f29f7d4154bf7f06e580a24f2430930f Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Mar 09 2010 11:22:51 +0000 Subject: - Update to 2.29.92 --- diff --git a/.cvsignore b/.cvsignore index 558f63d..7b1cdef 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -gnome-desktop-2.29.90.tar.bz2 +gnome-desktop-2.29.92.tar.bz2 diff --git a/concatenate-edid-descriptors.patch b/concatenate-edid-descriptors.patch index 04490b0..6ca8a3a 100644 --- a/concatenate-edid-descriptors.patch +++ b/concatenate-edid-descriptors.patch @@ -1,27 +1,18 @@ -diff -up gnome-desktop-2.27.4/libgnome-desktop/edid.h.concatenate-edid-descriptors gnome-desktop-2.27.4/libgnome-desktop/edid.h ---- gnome-desktop-2.27.4/libgnome-desktop/edid.h.concatenate-edid-descriptors 2009-04-19 13:39:06.000000000 -0400 -+++ gnome-desktop-2.27.4/libgnome-desktop/edid.h 2009-07-15 12:49:00.883963393 -0400 -@@ -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); -+void free_edid (MonitorInfo *); - char * make_display_name (const char *output_name, - const MonitorInfo *info); - -diff -up gnome-desktop-2.27.4/libgnome-desktop/edid-parse.c.concatenate-edid-descriptors gnome-desktop-2.27.4/libgnome-desktop/edid-parse.c ---- gnome-desktop-2.27.4/libgnome-desktop/edid-parse.c.concatenate-edid-descriptors 2009-04-19 13:39:06.000000000 -0400 -+++ gnome-desktop-2.27.4/libgnome-desktop/edid-parse.c 2009-07-15 12:53:51.648990812 -0400 -@@ -349,27 +349,44 @@ decode_standard_timings (const uchar *ed +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; } @@ -71,7 +62,7 @@ diff -up gnome-desktop-2.27.4/libgnome-desktop/edid-parse.c.concatenate-edid-des } static void -@@ -379,13 +396,16 @@ decode_display_descriptor (const uchar * +@@ -379,13 +396,16 @@ decode_display_descriptor (const uchar *desc, switch (desc[0x03]) { case 0xFC: @@ -110,12 +101,35 @@ diff -up gnome-desktop-2.27.4/libgnome-desktop/edid-parse.c.concatenate-edid-des MonitorInfo * decode_edid (const uchar *edid) { -diff -up gnome-desktop-2.27.4/libgnome-desktop/gnome-rr-config.c.concatenate-edid-descriptors gnome-desktop-2.27.4/libgnome-desktop/gnome-rr-config.c ---- gnome-desktop-2.27.4/libgnome-desktop/gnome-rr-config.c.concatenate-edid-descriptors 2009-06-29 19:35:54.000000000 -0400 -+++ gnome-desktop-2.27.4/libgnome-desktop/gnome-rr-config.c 2009-07-15 12:47:57.734218844 -0400 -@@ -491,7 +491,7 @@ gnome_rr_config_new_current (GnomeRRScre - output->display_name = make_display_name ( - gnome_rr_output_get_name (rr_output), info); +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); diff --git a/gnome-desktop.spec b/gnome-desktop.spec index dfd85a2..2d7df4c 100644 --- a/gnome-desktop.spec +++ b/gnome-desktop.spec @@ -11,19 +11,16 @@ Summary: Shared code among gnome-panel, gnome-session, nautilus, etc Name: gnome-desktop -Version: 2.29.91 +Version: 2.29.92 Release: 1%{?dist} URL: http://www.gnome.org Source0: http://download.gnome.org/sources/gnome-desktop/2.29/%{name}-%{version}.tar.bz2 +# https://bugzilla.gnome.org/show_bug.cgi?id=612276 Patch1: concatenate-edid-descriptors.patch # https://bugzilla.gnome.org/show_bug.cgi?id=599914 Patch3: ignore-xrandr-badmatch.patch -# https://bugzilla.gnome.org/show_bug.cgi?id=601753 -Patch5: slideshow.patch # https://bugzilla.gnome.org/show_bug.cgi?id=606456 Patch6: gnome-desktop-crash.patch -# https://bugzilla.gnome.org/show_bug.cgi?id=606457 -Patch7: randr-version.patch License: GPLv2+ and LGPLv2+ @@ -86,9 +83,7 @@ libgnomedesktop. %setup -q %patch1 -p1 -b .concatenate-edid-descriptors %patch3 -p1 -b .ignore-xrandr-badmatch -%patch5 -p1 -b .slideshow %patch6 -p1 -b .crash -%patch7 -p1 -b .randr-version %build @@ -137,6 +132,9 @@ rm -rf $RPM_BUILD_ROOT %doc %{_datadir}/gtk-doc/html/gnome-desktop/ %changelog +* Tue Mar 09 2010 Bastien Nocera 2.29.92-1 +- Update to 2.29.92 + * Mon Feb 22 2010 Matthias Clasen - 2.29.91-1 - Update to 2.29.91 diff --git a/ignore-xrandr-badmatch.patch b/ignore-xrandr-badmatch.patch index 7af07f1..9f41368 100644 --- a/ignore-xrandr-badmatch.patch +++ b/ignore-xrandr-badmatch.patch @@ -1,17 +1,26 @@ +commit cbd6fefb5ae24c409c56a104e8aa37693cebc6c0 +Author: Matthias Clasen +Date: Tue Mar 9 11:05:57 2010 +0000 + + Ignore errors when setting the monitor size fails + + Otherwise the front-end application might crash with BadMatch. + + https://bugzilla.gnome.org/show_bug.cgi?id=599914 + diff --git a/libgnome-desktop/gnome-rr.c b/libgnome-desktop/gnome-rr.c -index 6f23fbb..b744e38 100644 +index 1ef9c3c..2e86898 100644 --- a/libgnome-desktop/gnome-rr.c +++ b/libgnome-desktop/gnome-rr.c -@@ -683,8 +683,11 @@ gnome_rr_screen_set_size (GnomeRRScreen *screen, - { +@@ -743,8 +743,11 @@ gnome_rr_screen_set_size (GnomeRRScreen *screen, g_return_if_fail (screen != NULL); - + + #ifdef HAVE_RANDR + gdk_error_trap_push (); XRRSetScreenSize (screen->xdisplay, screen->xroot, width, height, mm_width, mm_height); + gdk_flush (); + gdk_error_trap_pop (); /* ignore error */ + #endif } - void - diff --git a/per-monitor-background.patch b/per-monitor-background.patch deleted file mode 100644 index b0c026b..0000000 --- a/per-monitor-background.patch +++ /dev/null @@ -1,565 +0,0 @@ -From 84657b9565dc5a70d709d2746def73efa0c7cf13 Mon Sep 17 00:00:00 2001 -From: William Jon McCann -Date: Sun, 8 Nov 2009 15:56:23 -0500 -Subject: [PATCH] Per monitors backgrounds support - -https://bugzilla.gnome.org/show_bug.cgi?id=147808 ---- - libgnome-desktop/gnome-bg.c | 251 ++++++++++++++++++++------------ - libgnome-desktop/libgnomeui/gnome-bg.h | 11 +- - 2 files changed, 164 insertions(+), 98 deletions(-) - -diff --git a/libgnome-desktop/gnome-bg.c b/libgnome-desktop/gnome-bg.c -index a882551..c584147 100644 ---- a/libgnome-desktop/gnome-bg.c -+++ b/libgnome-desktop/gnome-bg.c -@@ -168,7 +168,9 @@ static gboolean get_thumb_annotations (GdkPixbuf *thumb, - int *orig_height); - - /* Cache */ --static GdkPixbuf *get_pixbuf (GnomeBG *bg); -+static GdkPixbuf *get_pixbuf_for_size (GnomeBG *bg, -+ int width, -+ int height); - static void clear_cache (GnomeBG *bg); - static gboolean is_different (GnomeBG *bg, - const char *filename); -@@ -183,7 +185,11 @@ static SlideShow * get_as_slideshow (GnomeBG *bg, - const char *filename); - static Slide * get_current_slide (SlideShow *show, - double *alpha); --static gboolean slideshow_changes_with_size (SlideShow *show); -+static gboolean slideshow_has_multiple_sizes (SlideShow *show); -+ -+static FileSize *find_best_size (GSList *sizes, -+ gint width, -+ gint height); - - static void - color_from_string (const char *string, -@@ -685,12 +691,13 @@ get_scaled_pixbuf (GnomeBGPlacement placement, - } - - static void --draw_image (GnomeBGPlacement placement, -- GdkPixbuf *pixbuf, -- GdkPixbuf *dest) -+draw_image_area (GnomeBGPlacement placement, -+ GdkPixbuf *pixbuf, -+ GdkPixbuf *dest, -+ GdkRectangle *area) - { -- int dest_width = gdk_pixbuf_get_width (dest); -- int dest_height = gdk_pixbuf_get_height (dest); -+ int dest_width = area->width; -+ int dest_height = area->height; - int x, y, w, h; - GdkPixbuf *scaled; - -@@ -708,7 +715,7 @@ draw_image (GnomeBGPlacement placement, - case GNOME_BG_PLACEMENT_CENTERED: - case GNOME_BG_PLACEMENT_FILL_SCREEN: - case GNOME_BG_PLACEMENT_SCALED: -- pixbuf_blend (scaled, dest, 0, 0, w, h, x, y, 1.0); -+ pixbuf_blend (scaled, dest, 0, 0, w, h, x + area->x, y + area->y, 1.0); - break; - default: - g_assert_not_reached (); -@@ -718,51 +725,82 @@ draw_image (GnomeBGPlacement placement, - g_object_unref (scaled); - } - -+static void -+draw_image (GnomeBGPlacement placement, -+ GdkPixbuf *pixbuf, -+ GdkPixbuf *dest) -+{ -+ GdkRectangle rect; -+ -+ rect.x = 0; -+ rect.y = 0; -+ rect.width = gdk_pixbuf_get_width (dest); -+ rect.height = gdk_pixbuf_get_height (dest); -+ -+ draw_image_area (placement, pixbuf, dest, &rect); -+} -+ -+static void -+draw_each_monitor (GnomeBG *bg, -+ GdkPixbuf *dest, -+ GdkScreen *screen) -+{ -+ GdkRectangle rect; -+ -+ if (bg->placement == GNOME_BG_PLACEMENT_TILED) { -+ GdkScreen *screen; -+ -+ /* don't worry about aligning on every monitor */ -+ screen = gdk_screen_get_default (); -+ gdk_screen_get_monitor_geometry (screen, 0, &rect); -+ draw_image (bg->placement, -+ get_pixbuf_for_size (bg, rect.width, rect.height), -+ dest); -+ } else { -+ gint num_monitors; -+ int monitor; -+ -+ num_monitors = gdk_screen_get_n_monitors (screen); -+ for (monitor = 0; monitor < num_monitors; monitor++) { -+ gdk_screen_get_monitor_geometry (screen, monitor, &rect); -+ draw_image_area (bg->placement, -+ get_pixbuf_for_size (bg, rect.width, rect.height), -+ dest, &rect); -+ } -+ } -+} -+ - void --gnome_bg_draw (GnomeBG *bg, GdkPixbuf *dest) -+gnome_bg_draw (GnomeBG *bg, GdkPixbuf *dest, GdkScreen *screen) - { - if (!bg) - return; - - draw_color (bg, dest); - -- draw_image (bg->placement, get_pixbuf (bg), dest); -+ draw_each_monitor (bg, dest, screen); - } - - gboolean --gnome_bg_changes_with_size (GnomeBG *bg) -+gnome_bg_has_multiple_sizes (GnomeBG *bg) - { - SlideShow *show; - - g_return_val_if_fail (bg != NULL, FALSE); - - show = get_as_slideshow (bg, bg->filename); -- if (show) -- return slideshow_changes_with_size (show); -- -- if (bg->color_type != GNOME_BG_COLOR_SOLID) { -- if (!get_pixbuf (bg)) -- return TRUE; -- if (gdk_pixbuf_get_has_alpha (get_pixbuf (bg))) -- return TRUE; -- if (bg->placement == GNOME_BG_PLACEMENT_CENTERED) -- return TRUE; -- return FALSE; -- } -- else if (bg->placement == GNOME_BG_PLACEMENT_TILED) { -- return FALSE; -- } -- else { -- return TRUE; -- } -+ if (show) -+ return slideshow_has_multiple_sizes (show); -+ -+ return FALSE; - } - - static void --gnome_bg_get_pixmap_size (GnomeBG *bg, -- int width, -- int height, -- int *pixmap_width, -- int *pixmap_height) -+gnome_bg_get_pixmap_size (GnomeBG *bg, -+ int width, -+ int height, -+ int *pixmap_width, -+ int *pixmap_height) - { - int dummy; - int pb_width, pb_height; -@@ -774,8 +812,8 @@ gnome_bg_get_pixmap_size (GnomeBG *bg, - - *pixmap_width = width; - *pixmap_height = height; -- -- if (!get_pixbuf (bg)) { -+ -+ if (!bg->filename) { - switch (bg->color_type) { - case GNOME_BG_COLOR_SOLID: - *pixmap_width = 1; -@@ -796,11 +834,13 @@ gnome_bg_get_pixmap_size (GnomeBG *bg, - return; - } - -- pb_width = gdk_pixbuf_get_width (get_pixbuf (bg)); -- pb_height = gdk_pixbuf_get_height (get_pixbuf (bg)); -- - if (bg->placement == GNOME_BG_PLACEMENT_TILED) { -- if (gdk_pixbuf_get_has_alpha (get_pixbuf (bg)) && -+ GdkPixbuf *pixbuf; -+ pixbuf = get_pixbuf_for_size (bg, width, height); -+ pb_width = gdk_pixbuf_get_width (pixbuf); -+ pb_height = gdk_pixbuf_get_height (pixbuf); -+ -+ if (gdk_pixbuf_get_has_alpha (pixbuf) && - bg->color_type != GNOME_BG_COLOR_SOLID) { - if (bg->color_type == GNOME_BG_COLOR_H_GRADIENT) { - /* FIXME: Should this be -@@ -860,6 +900,7 @@ gnome_bg_create_pixmap (GnomeBG *bg, - bg->last_pixmap_width = width; - bg->last_pixmap_height = height; - -+ /* has the side effect of loading and caching pixbuf only when in tile mode */ - gnome_bg_get_pixmap_size (bg, width, height, &pm_width, &pm_height); - - if (root) { -@@ -870,7 +911,7 @@ gnome_bg_create_pixmap (GnomeBG *bg, - pixmap = gdk_pixmap_new (window, pm_width, pm_height, -1); - } - -- if (!get_pixbuf (bg) && bg->color_type == GNOME_BG_COLOR_SOLID) { -+ if (!bg->filename && bg->color_type == GNOME_BG_COLOR_SOLID) { - GdkGC *gc = gdk_gc_new (pixmap); - gdk_gc_set_rgb_fg_color (gc, &(bg->primary)); - -@@ -883,7 +924,7 @@ gnome_bg_create_pixmap (GnomeBG *bg, - - pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, - width, height); -- gnome_bg_draw (bg, pixbuf); -+ gnome_bg_draw (bg, pixbuf, gdk_drawable_get_screen (GDK_DRAWABLE (window))); - gdk_draw_pixbuf (pixmap, NULL, pixbuf, - 0, 0, - 0, 0, width, height, -@@ -899,10 +940,13 @@ gnome_bg_create_pixmap (GnomeBG *bg, - * clients know what colors to draw on top with - */ - gboolean --gnome_bg_is_dark (GnomeBG *bg) -+gnome_bg_is_dark (GnomeBG *bg, -+ int width, -+ int height) - { - GdkColor color; - int intensity; -+ GdkPixbuf *pixbuf; - - g_return_val_if_fail (bg != NULL, FALSE); - -@@ -913,9 +957,9 @@ gnome_bg_is_dark (GnomeBG *bg) - color.green = (bg->primary.green + bg->secondary.green) / 2; - color.blue = (bg->primary.blue + bg->secondary.blue) / 2; - } -- -- if (get_pixbuf (bg)) { -- guint32 argb = pixbuf_average_value (get_pixbuf (bg)); -+ pixbuf = get_pixbuf_for_size (bg, width, height); -+ if (pixbuf) { -+ guint32 argb = pixbuf_average_value (pixbuf); - guchar a = (argb >> 24) & 0xff; - guchar r = (argb >> 16) & 0xff; - guchar g = (argb >> 8) & 0xff; -@@ -1001,9 +1045,31 @@ get_original_size (const char *filename, - return result; - } - -+static const char * -+get_filename_for_size (GnomeBG *bg, gint best_width, gint best_height) -+{ -+ SlideShow *show; -+ Slide *slide; -+ FileSize *size; -+ -+ if (!bg->filename) -+ return NULL; -+ -+ show = get_as_slideshow (bg, bg->filename); -+ if (!show) { -+ return bg->filename; -+ } -+ -+ slide = get_current_slide (show, NULL); -+ size = find_best_size (slide->file1, best_width, best_height); -+ return size->file; -+} -+ - gboolean - gnome_bg_get_image_size (GnomeBG *bg, - GnomeDesktopThumbnailFactory *factory, -+ int best_width, -+ int best_height, - int *width, - int *height) - { -@@ -1017,21 +1083,8 @@ gnome_bg_get_image_size (GnomeBG *bg, - if (!bg->filename) - return FALSE; - -- filename = bg->filename; -+ filename = get_filename_for_size (bg, best_width, best_height); - thumb = create_thumbnail_for_filename (factory, filename); -- -- if (!thumb) { -- SlideShow *show = get_as_slideshow (bg, bg->filename); -- if (show) { -- double alpha; -- FileSize *fs; -- Slide *slide = get_current_slide (show, &alpha); -- fs = slide->file1->data; -- filename = fs->file; -- thumb = create_thumbnail_for_filename (factory, filename); -- } -- } -- - if (thumb) { - if (get_thumb_annotations (thumb, width, height)) - result = TRUE; -@@ -1316,7 +1369,7 @@ struct _SlideShow - - GQueue *slides; - -- gboolean changes_with_size; -+ gboolean has_multiple_sizes; - - /* used during parsing */ - struct tm start_tm; -@@ -1356,7 +1409,8 @@ get_current_slide (SlideShow *show, - Slide *slide = list->data; - - if (elapsed + slide->duration > delta) { -- *alpha = (delta - elapsed) / (double)slide->duration; -+ if (alpha) -+ *alpha = (delta - elapsed) / (double)slide->duration; - return slide; - } - -@@ -1512,7 +1566,10 @@ file_cache_add_slide_show (GnomeBG *bg, - } - - static GdkPixbuf * --get_as_pixbuf (GnomeBG *bg, const char *filename) -+get_as_pixbuf_for_size (GnomeBG *bg, -+ const char *filename, -+ int best_width, -+ int best_height) - { - const FileCacheEntry *ent; - if ((ent = file_cache_lookup (bg, PIXBUF, filename))) { -@@ -1523,14 +1580,14 @@ get_as_pixbuf (GnomeBG *bg, const char *filename) - GdkPixbuf *pixbuf; - - /* If scalable choose maximum size */ -- format = gdk_pixbuf_get_file_info (bg->filename, NULL, NULL); -+ format = gdk_pixbuf_get_file_info (filename, NULL, NULL); - if (format != NULL && - strcmp (gdk_pixbuf_format_get_name (format), "svg") == 0 && -- (bg->last_pixmap_width > 0 && bg->last_pixmap_height > 0) && -+ (best_width > 0 && best_height > 0) && - (bg->placement == GNOME_BG_PLACEMENT_FILL_SCREEN || - bg->placement == GNOME_BG_PLACEMENT_SCALED || - bg->placement == GNOME_BG_PLACEMENT_ZOOMED)) -- pixbuf = gdk_pixbuf_new_from_file_at_size (filename, bg->last_pixmap_width, bg->last_pixmap_height, NULL); -+ pixbuf = gdk_pixbuf_new_from_file_at_size (filename, best_width, best_height, NULL); - else - pixbuf = gdk_pixbuf_new_from_file (filename, NULL); - -@@ -1784,8 +1841,7 @@ create_img_thumbnail (GnomeBG *bg, - if (slide->fixed) { - GdkPixbuf *tmp; - FileSize *fs; -- -- fs = slide->file1->data; -+ fs = find_best_size (slide->file1, dest_width, dest_height); - tmp = get_as_thumbnail (bg, factory, fs->file); - - thumb = scale_thumbnail ( -@@ -1793,26 +1849,23 @@ create_img_thumbnail (GnomeBG *bg, - tmp, screen, dest_width, dest_height); - } - else { -- FileSize *fs; -+ FileSize *fs1, *fs2; - GdkPixbuf *p1, *p2; -+ fs1 = find_best_size (slide->file1, dest_width, dest_height); -+ p1 = get_as_thumbnail (bg, factory, fs1->file); - -- fs = slide->file1->data; -- p1 = get_as_thumbnail (bg, factory, fs->file); -- -- fs = slide->file2->data; -- p2 = get_as_thumbnail (bg, factory, fs->file); -+ fs2 = find_best_size (slide->file2, dest_width, dest_height); -+ p2 = get_as_thumbnail (bg, factory, fs2->file); - - if (p1 && p2) { - GdkPixbuf *thumb1, *thumb2; - -- fs = slide->file1->data; - thumb1 = scale_thumbnail ( -- bg->placement, fs->file, -+ bg->placement, fs1->file, - p1, screen, dest_width, dest_height); - -- fs = slide->file2->data; - thumb2 = scale_thumbnail ( -- bg->placement, fs->file, -+ bg->placement, fs2->file, - p2, screen, dest_width, dest_height); - - thumb = blend (thumb1, thumb2, alpha); -@@ -1880,18 +1933,26 @@ find_best_size (GSList *sizes, gint width, gint height) - } - - static GdkPixbuf * --get_pixbuf (GnomeBG *bg) -+get_pixbuf_for_size (GnomeBG *bg, gint best_width, gint best_height) - { - /* FIXME: this ref=TRUE/FALSE stuff is crazy */ -- - guint time_until_next_change; - gboolean ref = FALSE; -- -- if (!bg->pixbuf_cache && bg->filename) { -+ gboolean hit_cache = FALSE; -+ -+ /* only hit the cache if the aspect ratio matches */ -+ if (bg->pixbuf_cache) { -+ int width, height; -+ width = gdk_pixbuf_get_width (bg->pixbuf_cache); -+ height = gdk_pixbuf_get_height (bg->pixbuf_cache); -+ hit_cache = 0.2 > fabs ((best_width / (double)best_height) - (width / (double)height)); -+ } -+ -+ if (!hit_cache && bg->filename) { - ref = TRUE; - bg->file_mtime = get_mtime (bg->filename); - -- bg->pixbuf_cache = get_as_pixbuf (bg, bg->filename); -+ bg->pixbuf_cache = get_as_pixbuf_for_size (bg, bg->filename, best_width, best_height); - time_until_next_change = G_MAXUINT; - if (!bg->pixbuf_cache) { - SlideShow *show = get_as_slideshow (bg, bg->filename); -@@ -1906,16 +1967,16 @@ get_pixbuf (GnomeBG *bg) - time_until_next_change = (guint)get_slide_timeout (slide); - if (slide->fixed) { - FileSize *size; -- size = find_best_size (slide->file1, bg->last_pixmap_width, bg->last_pixmap_height); -- bg->pixbuf_cache = get_as_pixbuf (bg, size->file); -+ size = find_best_size (slide->file1, best_width, best_height); -+ bg->pixbuf_cache = get_as_pixbuf_for_size (bg, size->file, best_width, best_height); - } - else { - FileSize *size; - GdkPixbuf *p1, *p2; -- size = find_best_size (slide->file1, bg->last_pixmap_width, bg->last_pixmap_height); -- p1 = get_as_pixbuf (bg, size->file); -- size = find_best_size (slide->file2, bg->last_pixmap_width, bg->last_pixmap_height); -- p2 = get_as_pixbuf (bg, size->file); -+ size = find_best_size (slide->file1, best_width, best_height); -+ p1 = get_as_pixbuf_for_size (bg, size->file, best_width, best_height); -+ size = find_best_size (slide->file2, best_width, best_height); -+ p2 = get_as_pixbuf_for_size (bg, size->file, best_width, best_height); - - - if (p1 && p2) { -@@ -2368,14 +2429,14 @@ handle_text (GMarkupParseContext *context, - fs->file = g_strdup (text); - slide->file1 = g_slist_prepend (slide->file1, fs); - if (slide->file1->next != NULL) -- parser->changes_with_size = TRUE; -+ parser->has_multiple_sizes = TRUE; - } - else if (stack_is (parser, "size", "file", "static", "background", NULL) || - stack_is (parser, "size", "from", "transition", "background", NULL)) { - fs = slide->file1->data; - fs->file = g_strdup (text); - if (slide->file1->next != NULL) -- parser->changes_with_size = TRUE; -+ parser->has_multiple_sizes = TRUE; - } - else if (stack_is (parser, "to", "transition", "background", NULL)) { - for (i = 0; text[i]; i++) { -@@ -2390,13 +2451,13 @@ handle_text (GMarkupParseContext *context, - fs->file = g_strdup (text); - slide->file2 = g_slist_prepend (slide->file2, fs); - if (slide->file2->next != NULL) -- parser->changes_with_size = TRUE; -+ parser->has_multiple_sizes = TRUE; - } - else if (stack_is (parser, "size", "to", "transition", "background", NULL)) { - fs = slide->file2->data; - fs->file = g_strdup (text); - if (slide->file2->next != NULL) -- parser->changes_with_size = TRUE; -+ parser->has_multiple_sizes = TRUE; - } - } - -@@ -2639,9 +2700,9 @@ get_thumb_annotations (GdkPixbuf *thumb, - } - - static gboolean --slideshow_changes_with_size (SlideShow *show) -+slideshow_has_multiple_sizes (SlideShow *show) - { -- return show->changes_with_size; -+ return show->has_multiple_sizes; - } - - /* -diff --git a/libgnome-desktop/libgnomeui/gnome-bg.h b/libgnome-desktop/libgnomeui/gnome-bg.h -index 993173a..ddf9e5c 100644 ---- a/libgnome-desktop/libgnomeui/gnome-bg.h -+++ b/libgnome-desktop/libgnomeui/gnome-bg.h -@@ -87,7 +87,8 @@ const gchar * gnome_bg_get_filename (GnomeBG *bg); - - /* Drawing and thumbnailing */ - void gnome_bg_draw (GnomeBG *bg, -- GdkPixbuf *dest); -+ GdkPixbuf *dest, -+ GdkScreen *screen); - GdkPixmap * gnome_bg_create_pixmap (GnomeBG *bg, - GdkWindow *window, - int width, -@@ -95,6 +96,8 @@ GdkPixmap * gnome_bg_create_pixmap (GnomeBG *bg, - gboolean root); - gboolean gnome_bg_get_image_size (GnomeBG *bg, - GnomeDesktopThumbnailFactory *factory, -+ int best_width, -+ int best_height, - int *width, - int *height); - GdkPixbuf * gnome_bg_create_thumbnail (GnomeBG *bg, -@@ -102,8 +105,10 @@ GdkPixbuf * gnome_bg_create_thumbnail (GnomeBG *bg, - GdkScreen *screen, - int dest_width, - int dest_height); --gboolean gnome_bg_is_dark (GnomeBG *bg); --gboolean gnome_bg_changes_with_size (GnomeBG *bg); -+gboolean gnome_bg_is_dark (GnomeBG *bg, -+ int dest_width, -+ int dest_height); -+gboolean gnome_bg_has_multiple_sizes (GnomeBG *bg); - gboolean gnome_bg_changes_with_time (GnomeBG *bg); - GdkPixbuf * gnome_bg_create_frame_thumbnail (GnomeBG *bg, - GnomeDesktopThumbnailFactory *factory, --- -1.6.5.2 - -diff --git a/libgnome-desktop/gnome-bg.c b/libgnome-desktop/gnome-bg.c -index c584147..f050e70 100644 ---- a/libgnome-desktop/gnome-bg.c -+++ b/libgnome-desktop/gnome-bg.c -@@ -1843,10 +1843,10 @@ create_img_thumbnail (GnomeBG *bg, - FileSize *fs; - fs = find_best_size (slide->file1, dest_width, dest_height); - tmp = get_as_thumbnail (bg, factory, fs->file); -- -- thumb = scale_thumbnail ( -- bg->placement, fs->file, -- tmp, screen, dest_width, dest_height); -+ if (tmp) -+ thumb = scale_thumbnail ( -+ bg->placement, fs->file, -+ tmp, screen, dest_width, dest_height); - } - else { - FileSize *fs1, *fs2; diff --git a/randr-gamma.patch b/randr-gamma.patch deleted file mode 100644 index 2894a7f..0000000 --- a/randr-gamma.patch +++ /dev/null @@ -1,138 +0,0 @@ -From 8c052c789b585f434da1e6b92b3f452412074361 Mon Sep 17 00:00:00 2001 -From: Dave Airlie -Date: Thu, 8 Oct 2009 16:09:50 +1000 -Subject: [PATCH] rrcrtc: add initial gamma interfaces (v3) - -These are used by gnome-screensaver to do the fade in/out. - -Reviewed by ssp: removed unneeded crtc interfaces, -made get gamma to the allocs, for caller to free - -New interfaces: -Add gamma get/set functions per crtc. - -v3: coding style cleanups from ssp ---- - libgnome-desktop/gnome-rr.c | 75 ++++++++++++++++++++++++++++++++ - libgnome-desktop/libgnomeui/gnome-rr.h | 10 ++++ - 2 files changed, 85 insertions(+), 0 deletions(-) - -diff --git a/libgnome-desktop/gnome-rr.c b/libgnome-desktop/gnome-rr.c -index a64f8ae..9a93573 100644 ---- a/libgnome-desktop/gnome-rr.c -+++ b/libgnome-desktop/gnome-rr.c -@@ -74,6 +74,7 @@ struct GnomeRRCrtc - - GnomeRRRotation current_rotation; - GnomeRRRotation rotations; -+ int gamma_size; - }; - - struct GnomeRRMode -@@ -1447,6 +1448,9 @@ crtc_initialize (GnomeRRCrtc *crtc, - - XRRFreeCrtcInfo (info); - -+ /* get an store gamma size */ -+ crtc->gamma_size = XRRGetCrtcGammaSize (DISPLAY (crtc), crtc->id); -+ - return TRUE; - } - -@@ -1516,3 +1520,74 @@ mode_free (GnomeRRMode *mode) - g_free (mode->name); - g_free (mode); - } -+ -+void -+gnome_rr_crtc_set_gamma (GnomeRRCrtc *crtc, int size, -+ unsigned short *red, -+ unsigned short *green, -+ unsigned short *blue) -+{ -+ int copy_size; -+ XRRCrtcGamma *gamma; -+ -+ g_return_if_fail (crtc != NULL); -+ g_return_if_fail (red != NULL); -+ g_return_if_fail (green != NULL); -+ g_return_if_fail (blue != NULL); -+ -+ if (size != crtc->gamma_size) -+ return; -+ -+ gamma = XRRAllocGamma (crtc->gamma_size); -+ -+ copy_size = crtc->gamma_size * sizeof (unsigned short); -+ memcpy (gamma->red, red, copy_size); -+ memcpy (gamma->green, green, copy_size); -+ memcpy (gamma->blue, blue, copy_size); -+ -+ XRRSetCrtcGamma (DISPLAY (crtc), crtc->id, gamma); -+ XRRFreeGamma (gamma); -+} -+ -+gboolean -+gnome_rr_crtc_get_gamma (GnomeRRCrtc *crtc, int *size, -+ unsigned short **red, unsigned short **green, -+ unsigned short **blue) -+{ -+ int copy_size; -+ unsigned short *r, *g, *b; -+ XRRCrtcGamma *gamma; -+ -+ g_return_val_if_fail (crtc != NULL, FALSE); -+ -+ gamma = XRRGetCrtcGamma (DISPLAY (crtc), crtc->id); -+ if (!gamma) -+ return FALSE; -+ -+ copy_size = crtc->gamma_size * sizeof (unsigned short); -+ -+ if (red) { -+ r = g_new0 (unsigned short, crtc->gamma_size); -+ memcpy (r, gamma->red, copy_size); -+ *red = r; -+ } -+ -+ if (green) { -+ g = g_new0 (unsigned short, crtc->gamma_size); -+ memcpy (g, gamma->green, copy_size); -+ *green = g; -+ } -+ -+ if (blue) { -+ b = g_new0 (unsigned short, crtc->gamma_size); -+ memcpy (b, gamma->blue, copy_size); -+ *blue = b; -+ } -+ -+ XRRFreeGamma (gamma); -+ -+ if (size) -+ *size = crtc->gamma_size; -+ return TRUE; -+} -+ -diff --git a/libgnome-desktop/libgnomeui/gnome-rr.h b/libgnome-desktop/libgnomeui/gnome-rr.h -index 6eae3d0..e149336 100644 ---- a/libgnome-desktop/libgnomeui/gnome-rr.h -+++ b/libgnome-desktop/libgnomeui/gnome-rr.h -@@ -160,4 +160,14 @@ GnomeRRRotation gnome_rr_crtc_get_rotations (GnomeRRCrtc *crtc) - gboolean gnome_rr_crtc_supports_rotation (GnomeRRCrtc *crtc, - GnomeRRRotation rotation); - -+gboolean gnome_rr_crtc_get_gamma (GnomeRRCrtc *crtc, -+ int *size, -+ unsigned short **red, -+ unsigned short **green, -+ unsigned short **blue); -+void gnome_rr_crtc_set_gamma (GnomeRRCrtc *crtc, -+ int size, -+ unsigned short *red, -+ unsigned short *green, -+ unsigned short *blue); - #endif --- -1.6.5.rc2 - diff --git a/randr-version.patch b/randr-version.patch deleted file mode 100644 index 30c11ea..0000000 --- a/randr-version.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -up gnome-desktop-2.28.2/libgnome-desktop/gnome-rr.c.randr-version gnome-desktop-2.28.2/libgnome-desktop/gnome-rr.c ---- gnome-desktop-2.28.2/libgnome-desktop/gnome-rr.c.randr-version 2010-02-12 22:34:08.220397527 -0500 -+++ gnome-desktop-2.28.2/libgnome-desktop/gnome-rr.c 2010-02-16 11:20:55.832866111 -0500 -@@ -630,6 +630,12 @@ gnome_rr_screen_new (GdkScreen *gdk_scre - screen->randr_event_base = event_base; - - XRRQueryVersion (dpy, &screen->rr_major_version, &screen->rr_minor_version); -+ if (screen->rr_minor_version < 2) { -+ g_set_error (error, GNOME_RR_ERROR, GNOME_RR_ERROR_NO_RANDR_EXTENSION, -+ _("RANDR extension is too old (< 1.2)")); -+ g_free (screen); -+ return NULL; -+ } - - screen->info = screen_info_new (screen, TRUE, error); - diff --git a/slideshow.patch b/slideshow.patch deleted file mode 100644 index 51ce822..0000000 --- a/slideshow.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- gnome-desktop-2.28.1/libgnome-desktop/gnome-bg.c 2009-11-12 18:23:30.393878825 -0500 -+++ hacked/libgnome-desktop/gnome-bg.c 2009-11-12 18:18:32.296606140 -0500 -@@ -309,6 +309,11 @@ - { - bg->transitioned_id = 0; - -+ if (bg->pixbuf_cache) { -+ g_object_unref (bg->pixbuf_cache); -+ bg->pixbuf_cache = NULL; -+ } -+ - g_signal_emit (G_OBJECT (bg), signals[TRANSITIONED], 0); - - return FALSE; diff --git a/sources b/sources index 2badd20..836273f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a142841005d4dd8f40ebc48e65ec154d gnome-desktop-2.29.91.tar.bz2 +48ddcd2ad30656faee37016961046981 gnome-desktop-2.29.92.tar.bz2 diff --git a/spanned-background.patch b/spanned-background.patch deleted file mode 100644 index 171d267..0000000 --- a/spanned-background.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- gnome-desktop-2.29.90/libgnome-desktop/gnome-bg.c 2010-02-18 15:41:43.851703409 -0500 -+++ gnome-desktop-2.29.90.spanned/libgnome-desktop/gnome-bg.c 2010-02-18 14:42:53.895955816 -0500 -@@ -228,6 +228,7 @@ - { GNOME_BG_PLACEMENT_SCALED, "scaled" }, - { GNOME_BG_PLACEMENT_ZOOMED, "zoom" }, - { GNOME_BG_PLACEMENT_TILED, "wallpaper" }, -+ { GNOME_BG_PLACEMENT_SPANNED, "spanned" }, - { 0, NULL } - }; - -@@ -740,12 +741,17 @@ - GdkPixbuf *new; - - #if 0 -- g_print ("original_width: %d %d\n", -+ g_print ("get scaled %d %d, original_width: %d %d\n", -+ width, height, - gdk_pixbuf_get_width (pixbuf), - gdk_pixbuf_get_height (pixbuf)); - #endif - - switch (placement) { -+ case GNOME_BG_PLACEMENT_SPANNED: -+ new = pixbuf_scale_to_fit (pixbuf, width, height); -+ /* new = g_object_ref (pixbuf); */ -+ break; - case GNOME_BG_PLACEMENT_ZOOMED: - new = pixbuf_scale_to_min (pixbuf, width, height); - break; -@@ -800,6 +806,9 @@ - case GNOME_BG_PLACEMENT_SCALED: - pixbuf_blend (scaled, dest, 0, 0, w, h, x + area->x, y + area->y, 1.0); - break; -+ case GNOME_BG_PLACEMENT_SPANNED: -+ pixbuf_blend (scaled, dest, 0, 0, w, h, x, y, 1.0); -+ break; - default: - g_assert_not_reached (); - break; -@@ -878,7 +887,7 @@ - if (!bg) - return; - -- if (is_root) { -+ if (is_root && (bg->placement != GNOME_BG_PLACEMENT_SPANNED)) { - draw_color_each_monitor (bg, dest, screen); - draw_each_monitor (bg, dest, screen); - } else { ---- gnome-desktop-2.29.90/libgnome-desktop/libgnomeui/gnome-bg.h 2009-12-17 06:27:18.000000000 -0500 -+++ gnome-desktop-2.29.90.spanned/libgnome-desktop/libgnomeui/gnome-bg.h 2010-02-18 13:52:17.476702082 -0500 -@@ -59,7 +59,8 @@ - GNOME_BG_PLACEMENT_ZOOMED, - GNOME_BG_PLACEMENT_CENTERED, - GNOME_BG_PLACEMENT_SCALED, -- GNOME_BG_PLACEMENT_FILL_SCREEN -+ GNOME_BG_PLACEMENT_FILL_SCREEN, -+ GNOME_BG_PLACEMENT_SPANNED - } GnomeBGPlacement; - - GType gnome_bg_get_type (void);