[Xfce4-commits] [apps/xfce4-screensaver] 229/425: GTK3: replace deprecated gdk_window_set_background

noreply at xfce.org noreply at xfce.org
Mon Oct 15 01:51:16 CEST 2018


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-screensaver.

commit cc02e012cdd075a1a061603f0ade12f3eee20915
Author: Wolfgang Ulbrich <chat-to-me at raveit.de>
Date:   Sun Dec 13 19:52:51 2015 +0100

    GTK3: replace deprecated gdk_window_set_background
---
 savers/gs-theme-engine.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/savers/gs-theme-engine.c b/savers/gs-theme-engine.c
index d2ad4ad..4d6d441 100644
--- a/savers/gs-theme-engine.c
+++ b/savers/gs-theme-engine.c
@@ -110,8 +110,10 @@ gs_theme_engine_get_property (GObject            *object,
 static void
 gs_theme_engine_clear (GtkWidget *widget)
 {
+#if GTK_CHECK_VERSION (3, 0, 0)
+	GdkRGBA     color = { 0.0, 0.0, 0.0, 1.0 };
+#else
 	GdkColor     color = { 0, 0x0000, 0x0000, 0x0000 };
-#if !GTK_CHECK_VERSION (3, 0, 0)
 	GdkColormap *colormap;
 #endif
 	GtkStateType state;
@@ -126,12 +128,16 @@ gs_theme_engine_clear (GtkWidget *widget)
 	state = (GtkStateType) 0;
 	while (state < (GtkStateType) G_N_ELEMENTS (gtk_widget_get_style (widget)->bg))
 	{
+#if GTK_CHECK_VERSION (3, 0, 0)
+		gtk_widget_override_background_color (widget, state, &color);
+#else
 		gtk_widget_modify_bg (widget, state, &color);
+#endif
 		state++;
 	}
 
 #if GTK_CHECK_VERSION (3, 0, 0)
-	gdk_window_set_background (gtk_widget_get_window (widget), &color);
+	gdk_window_set_background_rgba (gtk_widget_get_window (widget), &color);
 #else
 	colormap = gdk_drawable_get_colormap (gtk_widget_get_window (widget));
 	gdk_colormap_alloc_color (colormap, &color, FALSE, TRUE);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list