sample: Fix GtkDemo/DemoImages progressive update with recent gtk+
This commit is contained in:
parent
c9c2d099ba
commit
b6e95af4a3
1 changed files with 8 additions and 1 deletions
|
@ -175,7 +175,14 @@ namespace GtkDemo
|
||||||
|
|
||||||
void ProgressiveUpdatedCallback (object obj, AreaUpdatedArgs args)
|
void ProgressiveUpdatedCallback (object obj, AreaUpdatedArgs args)
|
||||||
{
|
{
|
||||||
progressiveImage.QueueDraw ();
|
/* We know the pixbuf inside the GtkImage has changed, but the image
|
||||||
|
* itself doesn't know this; so give it a hint by setting the pixbuf
|
||||||
|
* again. Queuing a redraw used to be sufficient, but in recent GTK+,
|
||||||
|
* GtkImage uses GtkIconHelper which caches the pixbuf state and will
|
||||||
|
* just redraw from the cache.
|
||||||
|
*/
|
||||||
|
Pixbuf pixbuf = progressiveImage.Pixbuf;
|
||||||
|
progressiveImage.Pixbuf = pixbuf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue