diff options
-rw-r--r-- | libcaja-private/caja-icon-container.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c index 2574794f..af8de17e 100644 --- a/libcaja-private/caja-icon-container.c +++ b/libcaja-private/caja-icon-container.c @@ -4666,7 +4666,8 @@ realize (GtkWidget *widget) GTK_WIDGET_CLASS (caja_icon_container_parent_class)->realize (widget); container = CAJA_ICON_CONTAINER (widget); - + /* Unless GTK 3.21 or later is in use and the desktop must be transparent*/ +#if !GTK_CHECK_VERSION(3, 21, 0) /* Ensure that the desktop window is native so the background set on it is drawn by X. */ if (container->details->is_desktop) @@ -4677,7 +4678,7 @@ realize (GtkWidget *widget) gdk_x11_drawable_get_xid (gtk_layout_get_bin_window (GTK_LAYOUT (widget))); #endif } - +#endif /* Set up DnD. */ caja_icon_dnd_init (container); @@ -6243,6 +6244,7 @@ popup_menu (GtkWidget *widget) return TRUE; } +#if !GTK_CHECK_VERSION(3, 21, 0) static void draw_canvas_background (EelCanvas *canvas, #if GTK_CHECK_VERSION(3,0,0) @@ -6253,6 +6255,7 @@ draw_canvas_background (EelCanvas *canvas, { /* Don't chain up to the parent to avoid clearing and redrawing */ } +#endif #if !GTK_CHECK_VERSION(3,0,0) @@ -6737,8 +6740,9 @@ caja_icon_container_class_init (CajaIconContainerClass *class) widget_class->grab_notify = grab_notify_cb; canvas_class = EEL_CANVAS_CLASS (class); +#if !GTK_CHECK_VERSION(3, 21, 0) canvas_class->draw_background = draw_canvas_background; - +#endif class->start_interactive_search = caja_icon_container_start_interactive_search; #if GTK_CHECK_VERSION(3,0,0) |