Re: Grabbing Window focus for X11
Re: Grabbing Window focus for X11
- Subject: Re: Grabbing Window focus for X11
- From: Sean Ahern <email@hidden>
- Date: Thu, 30 Sep 2004 10:03:46 -0700
- Mail-followup-to: robert delius royar <email@hidden>, Apple X11 Users' List <email@hidden>
robert delius royar wrote:
> I have an application that is launched from a Platypus-bundled
> application folder. It calls X11 functions to raise its window on the
> X window stack. That works fine. But when it first launches, or
> afterwards when the dock icon for it is selected, it loses focus in
> the underlying system (i.e. the window bar at the top of its window is
> "greyed out").
I think I'm a bit confused here. Raising a window on the window stack
is not the same thing as setting input focus. Calling XRaiseWindow (or
XRestackWindows, XCirculate*, etc.) might have a side effect of setting
focus, depending on your window manager and its preferences, but I
certainly wouldn't rely on it.
I believe the call you're looking for is XSetInputFocus.
http://tronche.com/gui/x/xlib/input/controlling-focus.html
See the section in the ICCCM at
http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.7 for the down and
dirty.
> Where would I look (what Apple list or Apple docs) to find out how to
> programmatically force the window displaying the app to get system focus?
> Also, where would I look to discover how to assure that when the dock icon
> for the application is selected after it is running, that my X application
> can receive a message to raise its window again.
>
> I am using quartz-wm as the manager if that would make a difference.
>
> --
> Dr. Robert Delius Royar Associate Professor of English
> Morehead State University Morehead, Kentucky
-Sean
__
email@hidden
925-422-1648
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden