summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexei Sorokin <[email protected]>2017-03-12 15:07:16 +0300
committerAlexei Sorokin <[email protected]>2017-03-12 15:07:16 +0300
commitdc510d875ae166dd814cebc060186b4042b0ef30 (patch)
tree7d4b5b9e8bb16e561d4425a1a01923c6dfbe2bad /src
parentf8e542223bdd305ac69ed0380b05b9a0c99ad3ab (diff)
downloadcaja-dc510d875ae166dd814cebc060186b4042b0ef30.tar.bz2
caja-dc510d875ae166dd814cebc060186b4042b0ef30.tar.xz
eel: Avoid deprecated gdk_window_set_background functions
Diffstat (limited to 'src')
-rw-r--r--src/caja-desktop-window.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/caja-desktop-window.c b/src/caja-desktop-window.c
index f843d718..ce11d328 100644
--- a/src/caja-desktop-window.c
+++ b/src/caja-desktop-window.c
@@ -30,6 +30,7 @@
#include <X11/Xatom.h>
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
+#include <eel/eel-background.h>
#include <eel/eel-vfs-extensions.h>
#include <libcaja-private/caja-file-utilities.h>
#include <libcaja-private/caja-icon-names.h>
@@ -255,6 +256,17 @@ realize (GtkWidget *widget)
G_CALLBACK (caja_desktop_window_screen_size_changed), window);
}
+#if GTK_CHECK_VERSION (3, 22, 0)
+static gboolean
+draw (GtkWidget *widget,
+ cairo_t *cr)
+{
+ eel_background_draw (widget, cr);
+
+ return GTK_WIDGET_CLASS (caja_desktop_window_parent_class)->draw (widget, cr);
+}
+#endif
+
static char *
real_get_title (CajaWindow *window)
{
@@ -277,6 +289,9 @@ caja_desktop_window_class_init (CajaDesktopWindowClass *klass)
wclass->realize = realize;
wclass->unrealize = unrealize;
wclass->map = map;
+#if GTK_CHECK_VERSION (3, 22, 0)
+ wclass->draw = draw;
+#endif
nclass->window_type = CAJA_WINDOW_DESKTOP;
nclass->get_title = real_get_title;
nclass->get_icon = real_get_icon;