Find out windows xid:
wmctrl -l
First column/hex value is the xid, last column is window name. Run gstreamer now:
gst-launch-1.0 ximagesrc use-damage=false xid=0x02e00001 ! videoconvert ! xvimagesink
0x02e00001
is the hex xid from the previous command.
Without use-damage=false
image stutters.
Ximagesrc's xname option may be amiguous, it may contain only the executeable name of a multi process application.
So I would prefer xid over xname.