Author: cazfi
Date: Thu Feb 19 01:30:24 2015
New Revision: 28209

URL: http://svn.gna.org/viewcvs/freeciv?rev=28209&view=rev
Log:
Fixed Turn Done button blinking in gtk3-client.

See bug #23269

Modified:
    branches/S2_5/client/gui-gtk-3.0/mapview.c

Modified: branches/S2_5/client/gui-gtk-3.0/mapview.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-gtk-3.0/mapview.c?rev=28209&r1=28208&r2=28209&view=diff
==============================================================================
--- branches/S2_5/client/gui-gtk-3.0/mapview.c  (original)
+++ branches/S2_5/client/gui-gtk-3.0/mapview.c  Thu Feb 19 01:30:24 2015
@@ -80,13 +80,15 @@
   }
 
   if ((do_restore && flip) || !do_restore) {
-    GdkColor *fore = 
&gtk_widget_get_style(turn_done_button)->bg[GTK_STATE_NORMAL];
-    GdkColor *back = 
&gtk_widget_get_style(turn_done_button)->light[GTK_STATE_NORMAL];
-
-    gtk_widget_get_style(turn_done_button)->bg[GTK_STATE_NORMAL] = *back;
-    gtk_widget_get_style(turn_done_button)->light[GTK_STATE_NORMAL] = *fore;
-
-    gtk_expose_now(turn_done_button);
+    GdkRGBA fore;
+    GdkRGBA back;
+    GtkStyleContext *context = gtk_widget_get_style_context(turn_done_button);
+
+    gtk_style_context_get_color(context, GTK_STATE_FLAG_NORMAL, &fore);
+    gtk_style_context_get_background_color(context, GTK_STATE_FLAG_NORMAL, 
&back);
+
+    gtk_widget_override_color(turn_done_button, GTK_STATE_FLAG_NORMAL, &back);
+    gtk_widget_override_background_color(turn_done_button, 
GTK_STATE_FLAG_NORMAL, &fore);
 
     flip = !flip;
   }


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to