summaryrefslogtreecommitdiff
path: root/demos/testpixbuf-save.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-10-02 02:47:55 +0200
committerBenjamin Otte <otte@redhat.com>2010-10-02 03:08:24 +0200
commit872ef111ecabf6cd4453590b1e17afd3c9757f28 (patch)
treef84fe201a6661ac903334e780604a558b4bfc923 /demos/testpixbuf-save.c
parent0555dd06454a649943f8420512303ddd02ed5867 (diff)
downloadgtk+-872ef111ecabf6cd4453590b1e17afd3c9757f28.tar.gz
gdk: Make gdk_pixbuf_get_from_*() bindable
The ownership of the return value for gdk_pixbuf_get_from_window() and gdk_pixbuf_get_from_surface() was determined by the first argument. Because that is an ugly design and the functions are new to GTK3, we decided to adapt them. And that adaptation was quite easy since almost no one passses anything but NULL as the first argument.
Diffstat (limited to 'demos/testpixbuf-save.c')
-rw-r--r--demos/testpixbuf-save.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/demos/testpixbuf-save.c b/demos/testpixbuf-save.c
index e7cdd6034c..5277c89a6f 100644
--- a/demos/testpixbuf-save.c
+++ b/demos/testpixbuf-save.c
@@ -335,8 +335,8 @@ configure_cb (GtkWidget *drawing_area, GdkEventConfigure *evt, gpointer data)
GdkPixbuf *new_pixbuf;
root = gdk_get_default_root_window ();
- new_pixbuf = gdk_pixbuf_get_from_window (NULL, root,
- 0, 0, 0, 0, evt->width, evt->height);
+ new_pixbuf = gdk_pixbuf_get_from_window (root,
+ 0, 0, evt->width, evt->height);
g_object_set_data_full (G_OBJECT (drawing_area), "pixbuf", new_pixbuf,
(GDestroyNotify) g_object_unref);
}
@@ -356,8 +356,8 @@ main (int argc, char **argv)
gtk_init (&argc, &argv);
root = gdk_get_default_root_window ();
- pixbuf = gdk_pixbuf_get_from_window (NULL, root,
- 0, 0, 0, 0, 150, 160);
+ pixbuf = gdk_pixbuf_get_from_window (root,
+ 0, 0, 150, 160);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (window, "delete_event",