From eb5b9c396f25127ae7ea268c83dc7eba9cd460bc Mon Sep 17 00:00:00 2001 From: Sean Middleditch Date: Sat, 5 Mar 2011 00:58:52 -0800 Subject: [PATCH 3/3] Fix bad Cairo usage --- libxfce4ui/xfce-heading.c | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/libxfce4ui/xfce-heading.c b/libxfce4ui/xfce-heading.c index c5631fb..7e96c32 100644 --- a/libxfce4ui/xfce-heading.c +++ b/libxfce4ui/xfce-heading.c @@ -196,7 +196,7 @@ _xfce_heading_init (XfceHeading *heading) heading->priv = XFCE_HEADING_GET_PRIVATE (heading); /* setup the widget parameters */ - gtk_widget_set_has_window (GTK_WIDGET (heading), FALSE); + gtk_widget_set_has_window (GTK_WIDGET (heading), TRUE); } @@ -387,7 +387,6 @@ _xfce_heading_expose_event (GtkWidget *widget, gint x; gint y; GtkAllocation allocation; - GdkRectangle draw_rect; cairo_t *cr; /* check if we should render from right to left */ @@ -409,13 +408,8 @@ _xfce_heading_expose_event (GtkWidget *widget, y = (allocation.height - height) / 2; /* render the pixbuf */ - draw_rect.x = (rtl ? x - width : x); - draw_rect.y = y; - draw_rect.width = width; - draw_rect.height = height; cr = gdk_cairo_create (gtk_widget_get_window (widget)); - gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0); - gdk_cairo_rectangle (cr, &draw_rect); + gdk_cairo_set_source_pixbuf (cr, pixbuf, (rtl ? x - width : x), y); cairo_paint (cr); cairo_destroy (cr); -- 1.7.4.1