From 9212dacb2bfd5985d8426bf0bdb88f2aca03444e Mon Sep 17 00:00:00 2001 From: monsta Date: Thu, 3 Mar 2016 15:19:33 +0300 Subject: [GTK+3] re-add ability to show alt-tab thumbnails when compositor is on adapted from: https://git.gnome.org/browse/metacity/commit/?id=e6828a3ee2cab1ec1acbdd5a444dc1cb98215a75 https://git.gnome.org/browse/metacity/commit/?id=758902aef22629943738241cea1f597b6db4b18e https://git.gnome.org/browse/metacity/commit/?id=c6ba6dc7f458720d9f8666881f45a830580468cb https://git.gnome.org/browse/metacity/commit/?id=68bdf1ab9de815e07f5cd75b2e1fa24ba92ae319 https://git.gnome.org/browse/metacity/commit/?id=78bbf4423f72797a05bfaddd4121d70db30de9a3 --- src/ui/ui.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/ui/ui.c') diff --git a/src/ui/ui.c b/src/ui/ui.c index 731c615b..130a671f 100644 --- a/src/ui/ui.c +++ b/src/ui/ui.c @@ -1104,7 +1104,18 @@ MetaUIDirection meta_ui_get_direction(void) return META_UI_DIRECTION_LTR; } -#if !GTK_CHECK_VERSION (3, 0, 0) +#if GTK_CHECK_VERSION (3, 0, 0) +GdkPixbuf *meta_ui_get_pixbuf_from_surface (cairo_surface_t *surface) +{ + gint width; + gint height; + + width = cairo_xlib_surface_get_width (surface); + height = cairo_xlib_surface_get_height (surface); + + return gdk_pixbuf_get_from_surface (surface, 0, 0, width, height); +} +#else GdkPixbuf* meta_ui_get_pixbuf_from_pixmap(Pixmap pmap) { GdkPixmap* gpmap; -- cgit v1.2.1