Title of current window in X windows - Unix

This is a discussion on Title of current window in X windows - Unix ; Hi. I have slightly lame question. How can I get textual title of current (focused) window in running X windows system?...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Title of current window in X windows

  1. Title of current window in X windows

    Hi.
    I have slightly lame question. How can I get textual title of current
    (focused) window in running X windows system?

  2. Re: Title of current window in X windows

    sdf writes:

    > Hi.
    > I have slightly lame question. How can I get textual title of current
    > (focused) window in running X windows system?


    XGetWMName

    --
    Måns Rullgård
    mans@mansr.com

  3. Re: Title of current window in X windows

    On 2007-12-06, Måns Rullgård wrote:
    >
    > sdf writes:
    >
    >> Hi.
    >> I have slightly lame question. How can I get textual title of current
    >> (focused) window in running X windows system?

    >
    > XGetWMName


    .... which you must call of course, after you find out which window has
    the input focus by calling XGetInputFocus.

    Btw, XGetWMName is a convenience function. The window name is simply
    stored in a property called WM_NAME, on each window.

    --
    John Tsiombikas (Nuclear / Mindlapse)
    http://nuclear.sdf-eu.org/

  4. Re: Title of current window in X windows

    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

+ Reply to Thread