[gnome-screensaver] gs-window-x11: defer setting bg color until realization
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-screensaver] gs-window-x11: defer setting bg color until realization
- Date: Tue, 17 Jul 2012 19:44:34 +0000 (UTC)
commit 66c8ed0ffd4780d7262e1da4a1c1688adc6d1553
Author: Ray Strode <rstrode redhat com>
Date: Tue Jul 17 15:41:12 2012 -0400
gs-window-x11: defer setting bg color until realization
commit 43ee32edaddb9b9b9f4b43c47ca73d7b4eea9fae changed
the drawing area associated with each monitors screensaver
window to get realized early.
That change is seemingly causing problems for users.
This commit stops preemptively realizing the drawing areas,
and instead makes the background color settings get applied
reactively in response to realization.
http://bugzilla.gnome.org/show_bug.cgi?id=679441
src/gs-window-x11.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c
index c278612..8c95b49 100644
--- a/src/gs-window-x11.c
+++ b/src/gs-window-x11.c
@@ -2281,10 +2281,17 @@ create_panel (GSWindow *window)
}
static void
-gs_window_init (GSWindow *window)
+on_drawing_area_realized (GtkWidget *drawing_area)
{
GdkRGBA black = { 0.0, 0.0, 0.0, 1.0 };
+ gdk_window_set_background_rgba (gtk_widget_get_window (drawing_area),
+ &black);
+}
+
+static void
+gs_window_init (GSWindow *window)
+{
window->priv = GS_WINDOW_GET_PRIVATE (window);
window->priv->geometry.x = -1;
@@ -2329,8 +2336,10 @@ gs_window_init (GSWindow *window)
gtk_widget_show (window->priv->drawing_area);
gtk_widget_set_app_paintable (window->priv->drawing_area, TRUE);
gtk_box_pack_start (GTK_BOX (window->priv->vbox), window->priv->drawing_area, TRUE, TRUE, 0);
- gtk_widget_realize (window->priv->drawing_area);
- gdk_window_set_background_rgba (gtk_widget_get_window (window->priv->drawing_area), &black);
+ g_signal_connect (window->priv->drawing_area,
+ "realize",
+ G_CALLBACK (on_drawing_area_realized),
+ NULL);
create_info_bar (window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]