Now click on the window you would like to get the id, eg. Firefox. You will get some results like this:
xwininfo: Please select the window about which you
would like information by clicking the
mouse in that window.
xwininfo: Window id: 0x28000c8 "Getting window id for certain process id (for sharing theapplication) - Unix Linux Forum - Fixunix.com - Mozilla Firefox"
Absolute upper-left X: 107
Absolute upper-left Y: 102
Relative upper-left X: 0
Relative upper-left Y: 0
Visual Class: TrueColor
Border width: 0
Colormap: 0x20 (installed)
Bit Gravity State: NorthWestGravity
Window Gravity State: NorthWestGravity
Backing Store State: NotUseful
Save Under State: no
Map State: IsViewable
Override Redirect State: no
Corners: +107+102 -326+102 -326-295 +107-295
Here, the window id of Firefox is 0x28000c8.
Now you'll ask yourself why on earth would I need the window id. This is useful for example if you want to record a video with recordMyDesktop which takes the window id as an argument like this:
$ recordmydesktop -windowid 0x28000c8