Lines 607-635
static void pixbuf_renderer_get_property(GObject *object, guint prop_id,
Link Here
|
607 |
|
607 |
|
608 |
static gint pixbuf_renderer_expose(GtkWidget *widget, GdkEventExpose *event) |
608 |
static gint pixbuf_renderer_expose(GtkWidget *widget, GdkEventExpose *event) |
609 |
{ |
609 |
{ |
610 |
if (GTK_WIDGET_DRAWABLE(widget)) |
610 |
GdkRectangle *rects; |
611 |
{ |
611 |
int nrects, n; |
612 |
if (!GTK_WIDGET_NO_WINDOW(widget)) |
|
|
613 |
{ |
614 |
if (event->window != widget->window) |
615 |
{ |
616 |
GdkRectangle area; |
617 |
|
612 |
|
618 |
gdk_window_get_position(event->window, &area.x, &area.y); |
613 |
if (!GTK_WIDGET_DRAWABLE(widget)) return FALSE; |
|
|
614 |
if (GTK_WIDGET_NO_WINDOW(widget)) return FALSE; |
619 |
|
615 |
|
620 |
area.x += event->area.x; |
616 |
gdk_region_get_rectangles(event->region, &rects, &nrects); |
621 |
area.y += event->area.y; |
617 |
|
622 |
area.width = event->area.width; |
618 |
for (n = 0; n < nrects; n++) |
623 |
area.height = event->area.height; |
619 |
{ |
624 |
pixbuf_renderer_paint(PIXBUF_RENDERER(widget), &area); |
620 |
if (event->window != widget->window) |
625 |
} |
621 |
{ |
626 |
else |
622 |
GdkRectangle area; |
627 |
{ |
623 |
gdk_window_get_position(event->window, &area.x, &area.y); |
628 |
pixbuf_renderer_paint(PIXBUF_RENDERER(widget), &event->area); |
624 |
rects[n].x += area.x; |
629 |
} |
625 |
rects[n].y += area.y; |
630 |
} |
626 |
} |
|
|
627 |
pixbuf_renderer_paint(PIXBUF_RENDERER(widget), &rects[n]); |
631 |
} |
628 |
} |
632 |
|
629 |
|
|
|
630 |
g_free(rects); |
633 |
return FALSE; |
631 |
return FALSE; |
634 |
} |
632 |
} |
635 |
|
633 |
|
636 |
- |
|
|