Mercurial > geeqie.yaz
diff src/pixbuf-renderer.c @ 87:a2b0a7b0b490
Wed Oct 25 15:17:38 2006 John Ellis <johne@verizon.net>
* pixbuf-renderer.c (pixbuf_renderer_scroll): Fix long standing bug
where obstructed portions of an image were not always generating an
expose event when scrolling the image.
author | gqview |
---|---|
date | Wed, 25 Oct 2006 19:23:46 +0000 |
parents | 44f2223541d1 |
children | eb9bb29cbd65 |
line wrap: on
line diff
--- a/src/pixbuf-renderer.c Mon Oct 23 09:40:37 2006 +0000 +++ b/src/pixbuf-renderer.c Wed Oct 25 19:23:46 2006 +0000 @@ -2008,6 +2008,12 @@ w, h, pr->dither_quality, it->x + x, it->y + y); } + +#if 0 + /* enable this line for debugging the edges of tiles */ + gdk_draw_rectangle(it->pixmap, box->style->white_gc, + FALSE, 0, 0, it->w, it->h); +#endif } @@ -2779,6 +2785,7 @@ gint x2, y2; GtkWidget *box; GdkGC *gc; + GdkEvent *event; if (x_off < 0) { @@ -2833,6 +2840,19 @@ pr->x_scroll, y_off > 0 ? pr->y_scroll + (pr->vis_height - h) : pr->y_scroll, pr->vis_width, h, TRUE, TILE_RENDER_ALL, FALSE, FALSE); } + + /* process exposures here, "expose_event" seems to miss a few with obstructed windows */ + while ((event = gdk_event_get_graphics_expose(box->window)) != NULL) + { + pixbuf_renderer_paint(pr, &event->expose.area); + + if (event->expose.count == 0) + { + gdk_event_free(event); + break; + } + gdk_event_free(event); + } } }