From 4d1c861ade36250c2650f4526c375c3f6f7db73c Mon Sep 17 00:00:00 2001 From: Jasmine Hassan Date: Thu, 29 Nov 2012 16:32:43 +0200 Subject: [background] Don't draw the background if "draw-background" is false https://bugzilla.gnome.org/show_bug.cgi?id=564909 --- plugins/background/msd-background-manager.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/background/msd-background-manager.c b/plugins/background/msd-background-manager.c index 74d257c..40d396b 100644 --- a/plugins/background/msd-background-manager.c +++ b/plugins/background/msd-background-manager.c @@ -54,6 +54,8 @@ #endif #define MATE_BG_SHOW_DESKTOP_ICONS "show-desktop-icons" +#define MATE_BG_DRAW_BACKGROUND "draw-background" + #define MATE_SESSION_MANAGER_DBUS_NAME "org.mate.SessionManager" #define MATE_SESSION_MANAGER_DBUS_PATH "/org/mate/SessionManager" @@ -87,6 +89,13 @@ G_DEFINE_TYPE(MsdBackgroundManager, msd_background_manager, G_TYPE_OBJECT) static gpointer manager_object = NULL; +static gboolean +dont_draw_background (MsdBackgroundManager *manager) +{ + return !g_settings_get_boolean (manager->priv->settings, + MATE_BG_DRAW_BACKGROUND); +} + static gboolean caja_is_drawing_background (MsdBackgroundManager *manager) { @@ -210,7 +219,7 @@ draw_background (MsdBackgroundManager *manager, int n_screens; int i; - if (caja_is_drawing_background (manager)) + if (caja_is_drawing_background (manager) || dont_draw_background (manager)) { return; } -- cgit v1.2.1