diff options
author | Ray Strode <[email protected]> | 2012-07-17 19:41:12 +0000 |
---|---|---|
committer | Sorokin Alexei <[email protected]> | 2016-06-18 15:12:28 +0300 |
commit | 8b76c13a915f6060f3bcfde9f0d5f4177c1f6114 (patch) | |
tree | eee5a507dce4fb4d5f52ab56f3e90df075a6a7ae /src/gs-window-x11.c | |
parent | 4d0671b45247da95a4abd80743ad9be29019b852 (diff) | |
download | mate-screensaver-8b76c13a915f6060f3bcfde9f0d5f4177c1f6114.tar.bz2 mate-screensaver-8b76c13a915f6060f3bcfde9f0d5f4177c1f6114.tar.xz |
Gtk3, gs-window-x11: defer setting bg color until realization
commit adfc280 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
Diffstat (limited to 'src/gs-window-x11.c')
-rw-r--r-- | src/gs-window-x11.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c index d4bb564..b374715 100644 --- a/src/gs-window-x11.c +++ b/src/gs-window-x11.c @@ -2740,13 +2740,20 @@ create_info_bar (GSWindow *window) gtk_box_pack_end (GTK_BOX (window->priv->vbox), window->priv->info_bar, FALSE, FALSE, 0); } +#if GTK_CHECK_VERSION (3, 0, 0) static void -gs_window_init (GSWindow *window) +on_drawing_area_realized (GtkWidget *drawing_area) { -#if GTK_CHECK_VERSION (3, 0, 0) GdkRGBA black = { 0.0, 0.0, 0.0, 1.0 }; + gdk_window_set_background_rgba (gtk_widget_get_window (drawing_area), + &black); +} #endif + +static void +gs_window_init (GSWindow *window) +{ window->priv = GS_WINDOW_GET_PRIVATE (window); window->priv->geometry.x = -1; @@ -2789,9 +2796,10 @@ gs_window_init (GSWindow *window) #endif gtk_box_pack_start (GTK_BOX (window->priv->vbox), window->priv->drawing_area, TRUE, TRUE, 0); #if GTK_CHECK_VERSION (3, 0, 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); #endif create_info_bar (window); |