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



commit 7b6d0692aaba1fc77661f11f3942838d486bae5e
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 ae85df7..3114c3e 100644
--- a/src/gs-window-x11.c
+++ b/src/gs-window-x11.c
@@ -267,14 +267,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]