summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2016-07-29 17:02:30 -0400
committerraveit65 <[email protected]>2016-08-04 15:26:38 +0200
commit6f3c1e4dd60264244be353b42293cd0995589e5e (patch)
tree57daff1000d68a444cc669c48c2762a4a5ef3425
parent3a50eb19defa7416ae8857e6617b4d2beb375b02 (diff)
downloadcaja-6f3c1e4dd60264244be353b42293cd0995589e5e.tar.bz2
caja-6f3c1e4dd60264244be353b42293cd0995589e5e.tar.xz
GTK3.21:fix desktop redraw (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);