xlib - which app has input focus? - Xwindows

This is a discussion on xlib - which app has input focus? - Xwindows ; Hello, Is there an xlib call to find out which application currently has the input focus? This would be running under solaris 9 CDE (dt/xlib). Thanks, bl8n8r...

+ Reply to Thread
Results 1 to 3 of 3

Thread: xlib - which app has input focus?

  1. xlib - which app has input focus?

    Hello,
    Is there an xlib call to find out which application currently
    has the input focus?

    This would be running under solaris 9 CDE (dt/xlib).

    Thanks,
    bl8n8r

  2. Re: xlib - which app has input focus?

    bad_knee wrote:
    > Hello,
    > Is there an xlib call to find out which application currently
    > has the input focus?
    >
    > This would be running under solaris 9 CDE (dt/xlib).
    >
    > Thanks,
    > bl8n8r


    X11 does not include the concept of an application. You can use
    XGetInputFocus() to determine the window with focus. If you can
    identify the application by the window title you can use XGetWMName()
    starting with the focus window going up to just short of the root
    window and see if you find a WM_NAME along the way.

    -- ced

    --
    Chuck Dillon
    Senior Software Engineer
    NimbleGen Systems Inc.


  3. Re: xlib - which app has input focus?

    > X11 does not include the concept of an application. You can use
    > XGetInputFocus() to determine the window with focus. If you can
    > identify the application by the window title you can use XGetWMName()
    > starting with the focus window going up to just short of the root
    > window and see if you find a WM_NAME along the way.
    >
    > -- ced



    Ah, Good. Thank you. That's exactly what I am looking for.
    My next question would be how is XGetInputFocus() implemented?
    From the XtMain loop, or a callback timeout, or... ?

+ Reply to Thread