0

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 ?

daisy
  • 22,498
  • 29
  • 129
  • 265

1 Answers1

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.

Community
  • 1
  • 1
Antoine
  • 5,158
  • 1
  • 24
  • 37