[gtk+/rendering-cleanup-next: 24/153] calendar: Fix drawing order for windows
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup-next: 24/153] calendar: Fix drawing order for windows
- Date: Sat, 11 Sep 2010 04:53:27 +0000 (UTC)
commit 63f0ae5e60820d40a481cfa9a840dcf9c594246d
Author: Benjamin Otte <otte redhat com>
Date: Sat Sep 4 19:09:13 2010 +0200
calendar: Fix drawing order for windows
gtk/gtkcalendar.c | 25 +++++++++++--------------
1 files changed, 11 insertions(+), 14 deletions(-)
---
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index 00a0e5b..64cee4c 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -2880,12 +2880,21 @@ 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))
+ {
+ GtkAllocation allocation;
+
+ gtk_widget_get_allocation (widget, &allocation);
+ gtk_cairo_paint_shadow (gtk_widget_get_style (widget), cr,
+ gtk_widget_get_state (widget), GTK_SHADOW_IN,
+ widget, "calendar",
+ 0, 0, allocation.width, allocation.height);
+ }
+
if (event->window == priv->main_win)
calendar_paint_main (calendar, cr);
@@ -2902,18 +2911,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)
- {
- GtkAllocation allocation;
-
- gtk_widget_get_allocation (widget, &allocation);
- gtk_cairo_paint_shadow (gtk_widget_get_style (widget), cr,
- gtk_widget_get_state (widget), GTK_SHADOW_IN,
- widget, "calendar",
- 0, 0, allocation.width, allocation.height);
- }
-
cairo_destroy (cr);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]