user38529
user38529

Reputation: 13

Dump hidden (or minimized) X11 window

I'd like to dump the contents of an X window. Like this:

xwd -id | convert - capture.png

... which works quite well as long as the target window is not hidden (totally or partially behind other windows) or minimized.

Any idea on how to do this?

I guess we somehow have to send a "repaint" signal to the hidden window and then capture its response or something... :)

Upvotes: 1

Views: 1261

Answers (1)

Stobor
Stobor

Reputation: 45152

Do you have an objection to bringing it to the front first?

If not, you can use a tool like wmctrl to bring the window to the front (and maximize it, etc), use xwd to capture it, then send it back to where it came from with wmctrl.

Upvotes: 1

Related Questions