API: gdk: Remove ability to render window contents

Desktop / GNOME / GTK - Benjamin Otte [redhat.com] - 20 November 2016 04:47 UTC

The functions gdk_pixbuf_get_from_window() and gdk_cairo_set_source_window() are unreliable and depend on the windowing system (they work great on X11 and Win32, less so on Quartz and Wayland).

With the switch to new drawing API and OpenGL, we can definitely no longer support a generic way to snapshot windows.

People should either write windowsystem-specific code or draw their widgets directly - like with gtk_widget_draw() - if they need to get a rendering.

e62a4d8 API: gdk: Remove ability to render window contents
docs/reference/gdk/gdk4-sections.txt | 2 -
gdk/gdkcairo.c | 34 -------------
gdk/gdkcairo.h | 5 --
gdk/gdkpixbuf-drawable.c | 89 +---------------------------------
gdk/gdkpixbuf.h | 7 ---
gdk/gdkwindow.c | 56 ---------------------
6 files changed, 1 insertion(+), 192 deletions(-)

Upstream: git.gnome.org


  • Share