On Dec 5, 10:55 pm, sdf wrote:
> Hi.
> I have slightly lame question. How can I get textual title of current
> (focused) window in running X windows system?


XGetInputFocus will tell you which window is currently focussed. Then
read that window's WM_NAME property.

Please don't multi-post. Cross post, if you must.

-Ed

--
(You can't go wrong with psycho-rats.) (http://mi.eng.cam.ac.uk/
~er258)

/d{def}def/f{/Times findfont s scalefont setfont}d/s{11}d/r{roll}d f 2/
m
{moveto}d -1 r 230 350 m 0 1 179{1 index show 88 rotate 4 mul 0
rmoveto}
for /s 12 d f pop 235 420 translate 0 0 moveto 1 2 scale show
showpage