[gtk+/wip/window-unfocused-fixes: 13/13] cellrenderertoggle: Set GTK_STATE_FLAG_WINDOW_UNFOCUSED on draw



commit 7fc95348e3e66d730cac9306692908bd7f623d99
Author: Rui Matos <tiagomatos gmail com>
Date:   Tue Dec 13 20:35:29 2011 +0000

    cellrenderertoggle: Set GTK_STATE_FLAG_WINDOW_UNFOCUSED on draw
    
    https://bugzilla.gnome.org/show_bug.cgi?id=666126

 gtk/gtkcellrenderertoggle.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcellrenderertoggle.c b/gtk/gtkcellrenderertoggle.c
index 2c8debd..a44ff23 100644
--- a/gtk/gtkcellrenderertoggle.c
+++ b/gtk/gtkcellrenderertoggle.c
@@ -370,6 +370,8 @@ gtk_cell_renderer_toggle_render (GtkCellRenderer      *cell,
   else if (priv->active)
     state |= GTK_STATE_FLAG_ACTIVE;
 
+  state |= (gtk_widget_get_state_flags (widget) & GTK_STATE_FLAG_WINDOW_UNFOCUSED);
+
   cairo_save (cr);
 
   gdk_cairo_rectangle (cr, cell_area);



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