summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/file-manager/fm-desktop-icon-view.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c
index 0a67ab87..7214926d 100644
--- a/src/file-manager/fm-desktop-icon-view.c
+++ b/src/file-manager/fm-desktop-icon-view.c
@@ -38,7 +38,9 @@
#include <gdk/gdkx.h>
#include <glib/gi18n.h>
#include <libcaja-private/caja-desktop-icon-file.h>
+#if !GTK_CHECK_VERSION(3, 21, 0)
#include <libcaja-private/caja-directory-background.h>
+#endif
#include <libcaja-private/caja-directory-notify.h>
#include <libcaja-private/caja-file-changes-queue.h>
#include <libcaja-private/caja-file-operations.h>
@@ -473,6 +475,17 @@ realized_callback (GtkWidget *widget, FMDesktopIconView *desktop_icon_view)
gdk_window_add_filter (root_window,
desktop_icon_view_property_filter,
desktop_icon_view);
+
+ /*Set up a fallback background style class for the noncompositing case */
+#if GTK_CHECK_VERSION(3, 21, 0)
+ gboolean
+ composited = gtk_widget_is_composited (GTK_WIDGET(desktop_icon_view));
+ if (!composited){
+ GtkStyleContext *context;
+ context = gtk_widget_get_style_context (GTK_WIDGET(desktop_icon_view));
+ gtk_style_context_add_class(context,"caja-fallback-desktop-background");
+ }
+#endif
}
static CajaZoomLevel