Adapt to GTK API changes
This code adapts mutter to the latest changes to GTK in http://git.gnome.org/browse/gtk+/commit/?id=872ef111ecabf6cd4453590b1e17afd3c9757f28 that remove the dest argument from gdk_pixbuf_get_from_window() and gdk_pixbuf_get_from_surface(). It also removes the dest argument from meta_gdk_pixbuf_get_from_pixmap() to match. The function is internal and the argument wasn't used. https://bugzilla.gnome.org/show_bug.cgi?id=631147
This commit is contained in:
parent
c382d8f7ea
commit
33489c8cb8
@ -394,17 +394,15 @@ try_pixmap_and_mask (MetaDisplay *display,
|
|||||||
|
|
||||||
get_pixmap_geometry (display, src_pixmap, &w, &h, NULL);
|
get_pixmap_geometry (display, src_pixmap, &w, &h, NULL);
|
||||||
|
|
||||||
unscaled = meta_gdk_pixbuf_get_from_pixmap (NULL,
|
unscaled = meta_gdk_pixbuf_get_from_pixmap (src_pixmap,
|
||||||
src_pixmap,
|
0, 0,
|
||||||
0, 0, 0, 0,
|
|
||||||
w, h);
|
w, h);
|
||||||
|
|
||||||
if (unscaled && src_mask != None)
|
if (unscaled && src_mask != None)
|
||||||
{
|
{
|
||||||
get_pixmap_geometry (display, src_mask, &w, &h, NULL);
|
get_pixmap_geometry (display, src_mask, &w, &h, NULL);
|
||||||
mask = meta_gdk_pixbuf_get_from_pixmap (NULL,
|
mask = meta_gdk_pixbuf_get_from_pixmap (src_mask,
|
||||||
src_mask,
|
0, 0,
|
||||||
0, 0, 0, 0,
|
|
||||||
w, h);
|
w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
#if !GTK_CHECK_VERSION (2, 90, 8)
|
#if !GTK_CHECK_VERSION (2, 90, 8)
|
||||||
|
|
||||||
#define gdk_window_get_screen gdk_drawable_get_screen
|
#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) \
|
#define gdk_pixbuf_get_from_window(window, src_x, src_y, width, height) \
|
||||||
gdk_pixbuf_get_from_drawable(dest, window, NULL, src_x, src_y, dest_x, dest_y, width, height)
|
gdk_pixbuf_get_from_drawable(NULL, window, NULL, src_x, src_y, 0, 0, width, height)
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
gdk_window_get_width (GdkWindow *window)
|
gdk_window_get_width (GdkWindow *window)
|
||||||
|
@ -131,12 +131,9 @@ void meta_ui_window_menu_free (MetaWindowMenu *menu);
|
|||||||
|
|
||||||
|
|
||||||
/* FIXME these lack a display arg */
|
/* FIXME these lack a display arg */
|
||||||
GdkPixbuf* meta_gdk_pixbuf_get_from_pixmap (GdkPixbuf *dest,
|
GdkPixbuf* meta_gdk_pixbuf_get_from_pixmap (Pixmap xpixmap,
|
||||||
Pixmap xpixmap,
|
|
||||||
int src_x,
|
int src_x,
|
||||||
int src_y,
|
int src_y,
|
||||||
int dest_x,
|
|
||||||
int dest_y,
|
|
||||||
int width,
|
int width,
|
||||||
int height);
|
int height);
|
||||||
|
|
||||||
|
@ -54,8 +54,8 @@ get_pixbuf (void)
|
|||||||
last_grab_width, last_grab_height);
|
last_grab_width, last_grab_height);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
screenshot = gdk_pixbuf_get_from_window (NULL, gdk_get_default_root_window (),
|
screenshot = gdk_pixbuf_get_from_window (gdk_get_default_root_window (),
|
||||||
last_grab_x, last_grab_y, 0, 0,
|
last_grab_x, last_grab_y,
|
||||||
last_grab_width, last_grab_height);
|
last_grab_width, last_grab_height);
|
||||||
|
|
||||||
if (screenshot == NULL)
|
if (screenshot == NULL)
|
||||||
|
19
src/ui/ui.c
19
src/ui/ui.c
@ -372,12 +372,9 @@ meta_ui_window_menu_free (MetaWindowMenu *menu)
|
|||||||
|
|
||||||
#ifdef USE_GTK3
|
#ifdef USE_GTK3
|
||||||
GdkPixbuf*
|
GdkPixbuf*
|
||||||
meta_gdk_pixbuf_get_from_pixmap (GdkPixbuf *dest,
|
meta_gdk_pixbuf_get_from_pixmap (Pixmap xpixmap,
|
||||||
Pixmap xpixmap,
|
|
||||||
int src_x,
|
int src_x,
|
||||||
int src_y,
|
int src_y,
|
||||||
int dest_x,
|
|
||||||
int dest_y,
|
|
||||||
int width,
|
int width,
|
||||||
int height)
|
int height)
|
||||||
{
|
{
|
||||||
@ -414,12 +411,9 @@ meta_gdk_pixbuf_get_from_pixmap (GdkPixbuf *dest,
|
|||||||
w_ret, h_ret);
|
w_ret, h_ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
retval = gdk_pixbuf_get_from_surface (dest,
|
retval = gdk_pixbuf_get_from_surface (surface,
|
||||||
surface,
|
|
||||||
src_x,
|
src_x,
|
||||||
src_y,
|
src_y,
|
||||||
dest_x,
|
|
||||||
dest_y,
|
|
||||||
width,
|
width,
|
||||||
height);
|
height);
|
||||||
cairo_surface_destroy (surface);
|
cairo_surface_destroy (surface);
|
||||||
@ -465,12 +459,9 @@ get_cmap (GdkPixmap *pixmap)
|
|||||||
}
|
}
|
||||||
|
|
||||||
GdkPixbuf*
|
GdkPixbuf*
|
||||||
meta_gdk_pixbuf_get_from_pixmap (GdkPixbuf *dest,
|
meta_gdk_pixbuf_get_from_pixmap (Pixmap xpixmap,
|
||||||
Pixmap xpixmap,
|
|
||||||
int src_x,
|
int src_x,
|
||||||
int src_y,
|
int src_y,
|
||||||
int dest_x,
|
|
||||||
int dest_y,
|
|
||||||
int width,
|
int width,
|
||||||
int height)
|
int height)
|
||||||
{
|
{
|
||||||
@ -492,11 +483,11 @@ meta_gdk_pixbuf_get_from_pixmap (GdkPixbuf *dest,
|
|||||||
{
|
{
|
||||||
cmap = get_cmap (drawable);
|
cmap = get_cmap (drawable);
|
||||||
|
|
||||||
retval = gdk_pixbuf_get_from_drawable (dest,
|
retval = gdk_pixbuf_get_from_drawable (NULL,
|
||||||
drawable,
|
drawable,
|
||||||
cmap,
|
cmap,
|
||||||
src_x, src_y,
|
src_x, src_y,
|
||||||
dest_x, dest_y,
|
0, 0,
|
||||||
width, height);
|
width, height);
|
||||||
}
|
}
|
||||||
if (cmap)
|
if (cmap)
|
||||||
|
Loading…
Reference in New Issue
Block a user