From eb214f88096d7bc7dac5ec7180ab5e0c48b10a54 Mon Sep 17 00:00:00 2001 From: Thaddaeus Tintenfisch Date: Sat, 14 Mar 2015 12:00:04 +0100 Subject: [PATCH 1/2] Reinitialize background when reloading desktop (Bug #11620) --- src/xfce-backdrop.c | 2 +- src/xfce-backdrop.h | 2 ++ src/xfce-desktop.c | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/xfce-backdrop.c b/src/xfce-backdrop.c index 600b82e..2ffb445 100644 --- a/src/xfce-backdrop.c +++ b/src/xfce-backdrop.c @@ -232,7 +232,7 @@ create_gradient(GdkColor *color1, GdkColor *color2, gint width, gint height, return pix; } -static void +void xfce_backdrop_clear_cached_image(XfceBackdrop *backdrop) { g_return_if_fail(XFCE_IS_BACKDROP(backdrop)); diff --git a/src/xfce-backdrop.h b/src/xfce-backdrop.h index 8a5138f..ce72e97 100644 --- a/src/xfce-backdrop.h +++ b/src/xfce-backdrop.h @@ -150,6 +150,8 @@ GdkPixbuf *xfce_backdrop_get_pixbuf (XfceBackdrop *backdrop); void xfce_backdrop_generate_async (XfceBackdrop *backdrop); +void xfce_backdrop_clear_cached_image (XfceBackdrop *backdrop); + G_END_DECLS #endif diff --git a/src/xfce-desktop.c b/src/xfce-desktop.c index f6cbc60..8923bd2 100644 --- a/src/xfce-desktop.c +++ b/src/xfce-desktop.c @@ -1804,6 +1804,8 @@ xfce_desktop_refresh(XfceDesktop *desktop, gboolean advance_wallpaper) /* We need to trigger a new wallpaper event */ xfce_backdrop_force_cycle(backdrop); } else { + /* Reinitialize wallpaper */ + xfce_backdrop_clear_cached_image(backdrop); /* Fake a changed event so we redraw the wallpaper */ backdrop_changed_cb(backdrop, desktop); } -- 2.3.1