summaryrefslogtreecommitdiff
path: root/src/caja-desktop-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/caja-desktop-window.c')
-rw-r--r--src/caja-desktop-window.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/caja-desktop-window.c b/src/caja-desktop-window.c
index 743ee24f..cea694d0 100644
--- a/src/caja-desktop-window.c
+++ b/src/caja-desktop-window.c
@@ -167,6 +167,13 @@ map (GtkWidget *widget)
/* Chain up to realize our children */
GTK_WIDGET_CLASS (caja_desktop_window_parent_class)->map (widget);
gdk_window_lower (gtk_widget_get_window (widget));
+#if GTK_CHECK_VERSION(3, 21, 0)
+ GdkWindow *window;
+ GdkRGBA transparent = { 0, 0, 0, 0 };
+
+ window = gtk_widget_get_window (widget);
+ gdk_window_set_background_rgba (window, &transparent);
+#endif
}
static void
@@ -236,14 +243,21 @@ realize (GtkWidget *widget)
{
CajaDesktopWindow *window;
CajaDesktopWindowDetails *details;
-
+#if GTK_CHECK_VERSION(3, 21, 0)
+ GdkVisual *visual;
+#endif
window = CAJA_DESKTOP_WINDOW (widget);
details = window->details;
/* Make sure we get keyboard events */
gtk_widget_set_events (widget, gtk_widget_get_events (widget)
| GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK);
-
+#if GTK_CHECK_VERSION(3, 21, 0)
+ visual = gdk_screen_get_rgba_visual (gtk_widget_get_screen (widget));
+ if (visual) {
+ gtk_widget_set_visual (widget, visual);
+ }
+#endif
/* Do the work of realizing. */
GTK_WIDGET_CLASS (caja_desktop_window_parent_class)->realize (widget);