summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2014-04-09 23:31:21 +0200
committerBenjamin Otte <otte@redhat.com>2014-04-10 00:16:53 +0200
commit2587d4b8e6542ec578632c311309a3f4d13f0b3e (patch)
tree7c091d27e68b29968b49218d4c028916f098d88b /gtk
parent2a9d2a966a73c649c2749e759e44d6c0ea7af03b (diff)
downloadgtk+-2587d4b8e6542ec578632c311309a3f4d13f0b3e.tar.gz
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
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkpixelcache.c12
-rw-r--r--gtk/gtkpixelcacheprivate.h2
2 files changed, 14 insertions, 0 deletions
diff --git a/gtk/gtkpixelcache.c b/gtk/gtkpixelcache.c
index 2a909641f7..339518bf8a 100644
--- a/gtk/gtkpixelcache.c
+++ b/gtk/gtkpixelcache.c
@@ -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);
+}
diff --git a/gtk/gtkpixelcacheprivate.h b/gtk/gtkpixelcacheprivate.h
index 69635b7df2..c31693e140 100644
--- a/gtk/gtkpixelcacheprivate.h
+++ b/gtk/gtkpixelcacheprivate.h
@@ -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,