[evolution-data-server/gtk3] Bug #635519 - Crash at cell_renderer_color_render
- From: Vibha Yadav <yvibha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gtk3] Bug #635519 - Crash at cell_renderer_color_render
- Date: Thu, 2 Dec 2010 11:04:17 +0000 (UTC)
commit e3c0266b5e6cbf48f883b822e13c8ff2bcf7d4d9
Author: Vibha Yadav <yvibha novell com>
Date: Thu Dec 2 16:31:55 2010 +0530
Bug #635519 - Crash at cell_renderer_color_render
gtk_cell_renderer_render is passing cairo_t variable instead of
GtkWindow from gtk-3 onwards
libedataserverui/e-cell-renderer-color.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/libedataserverui/e-cell-renderer-color.c b/libedataserverui/e-cell-renderer-color.c
index 089c6b7..93d51cf 100644
--- a/libedataserverui/e-cell-renderer-color.c
+++ b/libedataserverui/e-cell-renderer-color.c
@@ -96,17 +96,15 @@ cell_renderer_color_get_size (GtkCellRenderer *cell,
static void
cell_renderer_color_render (GtkCellRenderer *cell,
- GdkWindow *window,
+ cairo_t *cr,
GtkWidget *widget,
GdkRectangle *background_area,
GdkRectangle *cell_area,
- GdkRectangle *expose_area,
GtkCellRendererState flags)
{
ECellRendererColorPrivate *priv;
GdkRectangle pix_rect;
GdkRectangle draw_rect;
- cairo_t *cr;
guint xpad;
guint ypad;
@@ -127,16 +125,13 @@ cell_renderer_color_render (GtkCellRenderer *cell,
pix_rect.width -= xpad * 2;
pix_rect.height -= ypad * 2;
- if (!gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect) ||
- !gdk_rectangle_intersect (expose_area, &draw_rect, &draw_rect))
+ if (!gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect))
return;
- cr = gdk_cairo_create (window);
gdk_cairo_set_source_color (cr, priv->color);
cairo_rectangle (cr, pix_rect.x, pix_rect.y, draw_rect.width, draw_rect.height);
cairo_fill (cr);
- cairo_destroy (cr);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]