From 4c10ec0fdac58498c8c9616b940ff78990c86c90 Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Sun, 12 Mar 2017 15:07:16 +0300 Subject: eel: Avoid deprecated gdk_window_set_background functions Fixes partially #506, fixes compiz-reloaded/compiz#40. --- src/caja-desktop-window.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') diff --git a/src/caja-desktop-window.c b/src/caja-desktop-window.c index 23d6809a..0d2a9f7f 100644 --- a/src/caja-desktop-window.c +++ b/src/caja-desktop-window.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -249,6 +250,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) { @@ -271,6 +283,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; -- cgit v1.2.1