diff options
author | Alexander Larsson <alexl@redhat.com> | 2009-03-26 13:04:33 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2009-03-26 13:04:33 +0000 |
commit | 25b82e76eb477ac73213446411712584e9621724 (patch) | |
tree | 74cce5f2a7dd16a65814e8fc9aba1709c85c36a5 | |
parent | fe409a8d4f57008e886cb8a57cb94d6eb7f54348 (diff) | |
download | gnome-desktop-25b82e76eb477ac73213446411712584e9621724.tar.gz |
push/pop error handler around getting the existing root pixmap in case the
2009-03-26 Alexander Larsson <alexl@redhat.com>
* gnome-bg.c (gnome_bg_get_pixmap_from_root):
push/pop error handler around getting the existing root pixmap in case
the root properties point to something wrong.
svn path=/trunk/; revision=5453
-rw-r--r-- | libgnome-desktop/ChangeLog | 6 | ||||
-rw-r--r-- | libgnome-desktop/gnome-bg.c | 9 |
2 files changed, 13 insertions, 2 deletions
diff --git a/libgnome-desktop/ChangeLog b/libgnome-desktop/ChangeLog index b41773f1..9b3abbac 100644 --- a/libgnome-desktop/ChangeLog +++ b/libgnome-desktop/ChangeLog @@ -1,3 +1,9 @@ +2009-03-26 Alexander Larsson <alexl@redhat.com> + + * gnome-bg.c (gnome_bg_get_pixmap_from_root): + push/pop error handler around getting the existing root pixmap in case + the root properties point to something wrong. + ==================== 2.26.0 ==================== 2009-03-06 Federico Mena Quintero <federico@novell.com> diff --git a/libgnome-desktop/gnome-bg.c b/libgnome-desktop/gnome-bg.c index acdd97fa..c5fe0ff7 100644 --- a/libgnome-desktop/gnome-bg.c +++ b/libgnome-desktop/gnome-bg.c @@ -1127,9 +1127,14 @@ gnome_bg_get_pixmap_from_root (GdkScreen *screen) } if (data != NULL) { + gdk_error_trap_push (); source_pixmap = gdk_pixmap_foreign_new (*(Pixmap *) data); - gdk_drawable_set_colormap (source_pixmap, - gdk_screen_get_default_colormap (screen)); + gdk_error_trap_pop (); + + if (source_pixmap != NULL) { + gdk_drawable_set_colormap (source_pixmap, + gdk_screen_get_default_colormap (screen)); + } } width = gdk_screen_get_width (screen); |