Getting window previews

adlo adloconwy at
Sat Jul 18 03:49:30 CEST 2015

> On 18 Jul 2015, at 00:48, Matthew Brush <mbrush at> wrote:
> There was a thread about it on this mailing list a while back (search for "Window previews in xfwm4"), maybe it gives some ideas.

I think I looked at that thread, but I could not find the actual code that gets the previews.

I have also used gdk_pixbuf_get_from_drawable to get previews of windows. I managed to get it to work, but I am interested in investigating alternative methods.

> I don't know what the other two methods are but I would guess they're "efficient enough". If you got everything working and after using/profiling found too slow, then you could look to more advanced ways.

I haven't tested it scientifically, but gdk_pixbuf_get_from_drawable and XGetImage seem slower compared to xfwm4.

> you can convert straight from an XImage to a Cairo image surface and paint it  onto a widget.

If I call gdk_pixmap_new, I need to pass the toplevel GdkWindow as a parameter. How can my code access this data when it is deep inside a GtkWidget?



More information about the Xfce4-dev mailing list