calendar: Fix drawing order for windows

This commit is contained in:
Benjamin Otte 2010-09-04 19:09:13 +02:00
parent 02572cdf7e
commit 725749cd14

View File

@ -2880,12 +2880,20 @@ gtk_calendar_expose (GtkWidget *widget,
if (gtk_widget_is_drawable (widget)) if (gtk_widget_is_drawable (widget))
{ {
GdkWindow *window;
cr = gdk_cairo_create (event->window); cr = gdk_cairo_create (event->window);
gdk_cairo_region (cr, event->region); gdk_cairo_region (cr, event->region);
cairo_clip (cr); 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) if (event->window == priv->main_win)
calendar_paint_main (calendar, cr); calendar_paint_main (calendar, cr);
@ -2902,17 +2910,6 @@ gtk_calendar_expose (GtkWidget *widget,
if (event->window == priv->week_win) if (event->window == priv->week_win)
calendar_paint_week_numbers (calendar, cr); 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); cairo_destroy (cr);
} }