Restricting the recording to a single window cannot be
done directly while recording.
Therefore please proceed as follows to get the same end-result:
With any export filter you can select an arbitrary rectangular area when exporting to any target format.
This is done using the option --rectangle widthxheight+x+y
To speed this up, I suggest playing back the video with DemoRecorder
and making a screenshot with gimp.
gimp displays the coordinates of the mouse cursor within a gimp-window. Based on these coordinates you can get some good values for the numbers.
Interview on the Linux Link Tech Show. Please select Episode 154.
DemoRecorder featured in Linux-User Magazine (in German)