summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasmine Hassan <[email protected]>2012-11-27 16:17:45 +0200
committerJasmine Hassan <[email protected]>2012-12-03 21:33:02 +0200
commitdf3d039e68b2d2bc5a3a8ec6cb1c97483096bc6b (patch)
treea8d66567fda4a60c4669a57ffcf65c7089d38406
parent01c34579453893b76849400c9375dcc67c44622f (diff)
downloadcaja-df3d039e68b2d2bc5a3a8ec6cb1c97483096bc6b.tar.bz2
caja-df3d039e68b2d2bc5a3a8ec6cb1c97483096bc6b.tar.xz
[eel-background] Make the desktop background fading effect optional
By checking new mate-bg (global) "background-fade" setting key before initiating a fade. This is hopefully useful for those running on older hardware, as the fading effect could delay login/startup a bit. For reference, see: https://bugzilla.gnome.org/show_bug.cgi?id=623174
-rw-r--r--eel/eel-background.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/eel/eel-background.c b/eel/eel-background.c
index 2706e713..a77834d8 100644
--- a/eel/eel-background.c
+++ b/eel/eel-background.c
@@ -41,6 +41,7 @@
#include <stdio.h>
#define MATE_DESKTOP_USE_UNSTABLE_API
#include <libmateui/mate-bg.h>
+#include <libcaja-private/caja-global-preferences.h>
#if !GTK_CHECK_VERSION(3, 0, 0)
#define cairo_surface_t GdkPixmap
@@ -454,11 +455,18 @@ static void
init_fade (EelBackground *self)
{
GtkWidget *widget = self->details->widget;
+ gboolean do_fade;
if (!self->details->is_desktop || widget == NULL || !gtk_widget_get_realized (widget)) {
return;
}
+ do_fade = g_settings_get_boolean (mate_background_preferences,
+ MATE_BG_KEY_BACKGROUND_FADE);
+ if (!do_fade) {
+ return;
+ }
+
if (self->details->fade == NULL)
{
int width, height;