[gtk+/rendering-cleanup-next: 25/155] calendar: Fix drawing order for windows



commit d4372029d159b601dcccbd788a895316ee626f6b
Author: Benjamin Otte <otte redhat com>
Date:   Sat Sep 4 19:09:13 2010 +0200

    calendar: Fix drawing order for windows

 gtk/gtkcalendar.c |   23 ++++++++++-------------
 1 files changed, 10 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index 7f214e1..8336880 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -2880,12 +2880,20 @@ gtk_calendar_expose (GtkWidget	    *widget,
 
   if (gtk_widget_is_drawable (widget))
     {
-      GdkWindow *window;
-
       cr = gdk_cairo_create (event->window);
       gdk_cairo_region (cr, event->region);
       cairo_clip (cr);
 
+      if (event->window == gtk_widget_get_window (widget))
+	{
+          gtk_cairo_paint_shadow (gtk_widget_get_style (widget), cr,
+                            gtk_widget_get_state (widget), GTK_SHADOW_IN,
+			    widget, "calendar",
+			    0, 0,
+                            gtk_widget_get_allocated_width (widget),
+                            gtk_widget_get_allocated_height (widget));
+	}
+
       if (event->window == priv->main_win)
 	calendar_paint_main (calendar, cr);
       
@@ -2902,17 +2910,6 @@ gtk_calendar_expose (GtkWidget	    *widget,
       if (event->window == priv->week_win)
 	calendar_paint_week_numbers (calendar, cr);
 
-      window = gtk_widget_get_window (widget);
-      if (event->window == window)
-	{
-          gtk_cairo_paint_shadow (gtk_widget_get_style (widget), cr,
-                            gtk_widget_get_state (widget), GTK_SHADOW_IN,
-			    widget, "calendar",
-			    0, 0,
-                            gtk_widget_get_allocated_width (widget),
-                            gtk_widget_get_allocated_height (widget));
-	}
-
       cairo_destroy (cr);
     }
   



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