summaryrefslogtreecommitdiff
path: root/savers/gs-theme-window.c
diff options
context:
space:
mode:
authorSorokin Alexei <[email protected]>2016-06-18 23:48:12 +0300
committerSorokin Alexei <[email protected]>2016-06-18 23:48:12 +0300
commit051d9df1ca81e586f43d1d95a1ac3159452d4f17 (patch)
tree025200ea2e9a76d70fc6f862bef99e240510fa92 /savers/gs-theme-window.c
parent156f1b626cdd4e22beea0fbdba5869e2f693020a (diff)
downloadmate-screensaver-051d9df1ca81e586f43d1d95a1ac3159452d4f17.tar.bz2
mate-screensaver-051d9df1ca81e586f43d1d95a1ac3159452d4f17.tar.xz
Gtk3: fix several deprecations
Diffstat (limited to 'savers/gs-theme-window.c')
-rw-r--r--savers/gs-theme-window.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/savers/gs-theme-window.c b/savers/gs-theme-window.c
index 0741aad..47c731e 100644
--- a/savers/gs-theme-window.c
+++ b/savers/gs-theme-window.c
@@ -62,6 +62,7 @@ gs_theme_window_class_init (GSThemeWindowClass *klass)
widget_class->realize = gs_theme_window_real_realize;
}
+#if !GTK_CHECK_VERSION (3, 0, 0)
static void
force_no_pixmap_background (GtkWidget *widget)
{
@@ -90,11 +91,16 @@ force_no_pixmap_background (GtkWidget *widget)
gtk_widget_set_name (widget, "gs-window");
}
+#endif
static void
gs_theme_window_init (GSThemeWindow *window)
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_app_paintable (GTK_WIDGET (window), TRUE);
+#else
force_no_pixmap_background (GTK_WIDGET (window));
+#endif
}
static void
@@ -177,9 +183,14 @@ gs_theme_window_real_realize (GtkWidget *widget)
return;
}
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_style_context_set_background (gtk_widget_get_style_context (widget),
+ window);
+#else
gtk_style_set_background (gtk_widget_get_style (widget),
window,
GTK_STATE_NORMAL);
+#endif
gdk_window_set_decorations (window, (GdkWMDecoration) 0);
gdk_window_set_events (window, gdk_window_get_events (window) | event_mask);