diff --git a/src/core/iconcache.c b/src/core/iconcache.c index b3ec718c9..1b3690d99 100644 --- a/src/core/iconcache.c +++ b/src/core/iconcache.c @@ -394,17 +394,15 @@ try_pixmap_and_mask (MetaDisplay *display, get_pixmap_geometry (display, src_pixmap, &w, &h, NULL); - unscaled = meta_gdk_pixbuf_get_from_pixmap (NULL, - src_pixmap, - 0, 0, 0, 0, + unscaled = meta_gdk_pixbuf_get_from_pixmap (src_pixmap, + 0, 0, w, h); if (unscaled && src_mask != None) { get_pixmap_geometry (display, src_mask, &w, &h, NULL); - mask = meta_gdk_pixbuf_get_from_pixmap (NULL, - src_mask, - 0, 0, 0, 0, + mask = meta_gdk_pixbuf_get_from_pixmap (src_mask, + 0, 0, w, h); } diff --git a/src/gdk-compat.h b/src/gdk-compat.h index 37a169503..5dee8bb6d 100644 --- a/src/gdk-compat.h +++ b/src/gdk-compat.h @@ -19,8 +19,8 @@ #if !GTK_CHECK_VERSION (2, 90, 8) #define gdk_window_get_screen gdk_drawable_get_screen -#define gdk_pixbuf_get_from_window(dest, window, src_x, src_y, dest_x, dest_y, width, height) \ - gdk_pixbuf_get_from_drawable(dest, window, NULL, src_x, src_y, dest_x, dest_y, width, height) +#define gdk_pixbuf_get_from_window(window, src_x, src_y, width, height) \ + gdk_pixbuf_get_from_drawable(NULL, window, NULL, src_x, src_y, 0, 0, width, height) static inline int gdk_window_get_width (GdkWindow *window) diff --git a/src/include/ui.h b/src/include/ui.h index 99ccf9da5..ecf84701d 100644 --- a/src/include/ui.h +++ b/src/include/ui.h @@ -131,12 +131,9 @@ void meta_ui_window_menu_free (MetaWindowMenu *menu); /* FIXME these lack a display arg */ -GdkPixbuf* meta_gdk_pixbuf_get_from_pixmap (GdkPixbuf *dest, - Pixmap xpixmap, +GdkPixbuf* meta_gdk_pixbuf_get_from_pixmap (Pixmap xpixmap, int src_x, int src_y, - int dest_x, - int dest_y, int width, int height); diff --git a/src/tools/mutter-mag.c b/src/tools/mutter-mag.c index 14c22e708..a271145ed 100644 --- a/src/tools/mutter-mag.c +++ b/src/tools/mutter-mag.c @@ -54,8 +54,8 @@ get_pixbuf (void) last_grab_width, last_grab_height); #endif - screenshot = gdk_pixbuf_get_from_window (NULL, gdk_get_default_root_window (), - last_grab_x, last_grab_y, 0, 0, + screenshot = gdk_pixbuf_get_from_window (gdk_get_default_root_window (), + last_grab_x, last_grab_y, last_grab_width, last_grab_height); if (screenshot == NULL) diff --git a/src/ui/ui.c b/src/ui/ui.c index 83123d121..8870cd0ec 100644 --- a/src/ui/ui.c +++ b/src/ui/ui.c @@ -372,12 +372,9 @@ meta_ui_window_menu_free (MetaWindowMenu *menu) #ifdef USE_GTK3 GdkPixbuf* -meta_gdk_pixbuf_get_from_pixmap (GdkPixbuf *dest, - Pixmap xpixmap, +meta_gdk_pixbuf_get_from_pixmap (Pixmap xpixmap, int src_x, int src_y, - int dest_x, - int dest_y, int width, int height) { @@ -414,12 +411,9 @@ meta_gdk_pixbuf_get_from_pixmap (GdkPixbuf *dest, w_ret, h_ret); } - retval = gdk_pixbuf_get_from_surface (dest, - surface, + retval = gdk_pixbuf_get_from_surface (surface, src_x, src_y, - dest_x, - dest_y, width, height); cairo_surface_destroy (surface); @@ -465,12 +459,9 @@ get_cmap (GdkPixmap *pixmap) } GdkPixbuf* -meta_gdk_pixbuf_get_from_pixmap (GdkPixbuf *dest, - Pixmap xpixmap, +meta_gdk_pixbuf_get_from_pixmap (Pixmap xpixmap, int src_x, int src_y, - int dest_x, - int dest_y, int width, int height) { @@ -492,11 +483,11 @@ meta_gdk_pixbuf_get_from_pixmap (GdkPixbuf *dest, { cmap = get_cmap (drawable); - retval = gdk_pixbuf_get_from_drawable (dest, + retval = gdk_pixbuf_get_from_drawable (NULL, drawable, cmap, src_x, src_y, - dest_x, dest_y, + 0, 0, width, height); } if (cmap)