summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2016-07-29 17:10:22 -0400
committerraveit65 <[email protected]>2016-08-04 15:30:23 +0200
commit190d8b70717fc2b91507ae7695acdeee894c11cd (patch)
tree5d071bf90f1800bbc5e451918c0b9f56d3225796
parent3d61fc43087764d2a99c8cdce4bebc697ba961bc (diff)
downloadcaja-190d8b70717fc2b91507ae7695acdeee894c11cd.tar.bz2
caja-190d8b70717fc2b91507ae7695acdeee894c11cd.tar.xz
GTK3.21:fix desktop redraw (caja-icon-container.c)
-rw-r--r--libcaja-private/caja-icon-container.c10
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)