I wanted to migrate Compiz's Window Picker function to XFCE environment , so i needed to grab an image of the window running in current display , and display it with an GtkWidget
, but how ?
Asked
Active
Viewed 429 times
0

daisy
- 22,498
- 29
- 129
- 265
1 Answers
1
If you don't mind relying on an external tool, you can acquire the image by invoking ImageMagick's import -window 0xid bmp-
. Read the output from a pipe and create the appropriate GTK object.
Of course, you will to replace the window ID you want to get the image from. Here is a post that will help you get the window ID from a a Process ID.
-
actually i should take a look at xwd.c , but thanks anyway , i'm closing this thread. – daisy Nov 24 '11 at 15:25