summaryrefslogtreecommitdiff
path: root/gdk/gdkwindowimpl.h
diff options
context:
space:
mode:
authorGiovanni Campagna <gcampagna@src.gnome.org>2014-02-26 00:02:04 +0100
committerGiovanni Campagna <gcampagna@src.gnome.org>2014-02-26 00:04:41 +0100
commitad2f96ff482d1cde7a91ffc30bbc81e2b9bde01b (patch)
tree37390095a794e6fc5708dab231d5ea6471d301cd /gdk/gdkwindowimpl.h
parentd5196ded2fe0da9831a2d002250911fdeee62d83 (diff)
downloadgtk+-ad2f96ff482d1cde7a91ffc30bbc81e2b9bde01b.tar.gz
Gdk: fix wrong user_data handling in resize_cairo_surface()
Instead of destroying the surface in the backend if this is unable to resize, let the core code do it, and do it properly. Based on a patch by Benjamin Otte. https://bugzilla.gnome.org/show_bug.cgi?id=725172
Diffstat (limited to 'gdk/gdkwindowimpl.h')
-rw-r--r--gdk/gdkwindowimpl.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/gdk/gdkwindowimpl.h b/gdk/gdkwindowimpl.h
index ab04985c98..ed7d4c55c0 100644
--- a/gdk/gdkwindowimpl.h
+++ b/gdk/gdkwindowimpl.h
@@ -158,10 +158,14 @@ struct _GdkWindowImplClass
*/
void (*destroy_foreign) (GdkWindow *window);
- cairo_surface_t * (* resize_cairo_surface) (GdkWindow *window,
- cairo_surface_t *surface,
- gint width,
- gint height);
+ /* Resizes @surface to a new size. If successful, return %TRUE.
+ * If the backend cannot resize surfaces, return %FALSE and a new
+ * surface will be created instead.
+ */
+ gboolean (* resize_cairo_surface) (GdkWindow *window,
+ cairo_surface_t *surface,
+ gint width,
+ gint height);
/* optional */
gboolean (* beep) (GdkWindow *window);