[gnome-screensaver/gnome-3-0] Properly clear to black when cancelling unlock



commit ec9acd4eba1ee0117ee688cf097383d253eaa6ba
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Aug 26 08:09:10 2011 -0400

    Properly clear to black when cancelling unlock
    
    Since GTK+ is now drawing in more cases, we need to override
    the GTK+ background color, instead of just setting the GDK
    window background.
    
    Based on a patch by Marc Deslauriers,
    https://bugzilla.gnome.org/show_bug.cgi?id=657358

 src/gs-window-x11.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c
index 40f1554..c034947 100644
--- a/src/gs-window-x11.c
+++ b/src/gs-window-x11.c
@@ -264,14 +264,12 @@ gs_window_clear_to_background_surface (GSWindow *window)
 static void
 clear_widget (GtkWidget *widget)
 {
-        GdkColor color = { 0, 0x0000, 0x0000, 0x0000 };
+        GdkRGBA rgba = { 0.0, 0.0, 0.0, 1.0 };
 
         if (!gtk_widget_get_realized (widget))
                 return;
 
-        gdk_window_set_background (gtk_widget_get_window (widget),
-                                   &color);
-        gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, &color);
+        gtk_widget_override_background_color (widget, GTK_STATE_FLAG_NORMAL, &rgba);
         gtk_widget_queue_draw (GTK_WIDGET (widget));
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]