pixelcache: Add map/unmap functions
Because GTK does not invalidate windows that aren't mapped, we cannot update the pixel cache when the window it handles isn't mapped. So we add API to call when GDK windows get mapped/unmapped. https://bugzilla.gnome.org/show_bug.cgi?id=726475
This commit is contained in:
@ -467,3 +467,15 @@ _gtk_pixel_cache_draw (GtkPixelCache *cache,
|
||||
draw (cr, user_data);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_pixel_cache_map (GtkPixelCache *cache)
|
||||
{
|
||||
_gtk_pixel_cache_invalidate (cache, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_pixel_cache_unmap (GtkPixelCache *cache)
|
||||
{
|
||||
gtk_pixel_cache_blow_cache (cache);
|
||||
}
|
||||
|
||||
@ -32,6 +32,8 @@ typedef void (*GtkPixelCacheDrawFunc) (cairo_t *cr,
|
||||
|
||||
GtkPixelCache *_gtk_pixel_cache_new (void);
|
||||
void _gtk_pixel_cache_free (GtkPixelCache *cache);
|
||||
void _gtk_pixel_cache_map (GtkPixelCache *cache);
|
||||
void _gtk_pixel_cache_unmap (GtkPixelCache *cache);
|
||||
void _gtk_pixel_cache_invalidate (GtkPixelCache *cache,
|
||||
cairo_region_t *region);
|
||||
void _gtk_pixel_cache_draw (GtkPixelCache *cache,
|
||||
|
||||
Reference in New Issue
Block a user