[CentOS] Extracting the window (titlebar) name from a bash script?

Sun Jul 22 03:42:14 UTC 2012
Fernando Cassia <fcassia at gmail.com>

Surely there' s a way to obtain the "window name" -which appears on
the Window Manager' s Titlebar- for running processes, right?.
Well, I can't find it...

I mean, the names that appear below each icon when you alt-tab to
switch an app to the foreground.
Is there a simple way to obtain that data along with matching PIDs,
from a Bash script? any built-in tools that provide such?

TIA
FC
-- 
During times of Universal Deceit, telling the truth becomes a revolutionary act
- George Orwell