Re: Grabbing Window focus for X11
Re: Grabbing Window focus for X11
- Subject: Re: Grabbing Window focus for X11
- From: Greg Parker <email@hidden>
- Date: Thu, 30 Sep 2004 14:07:20 -0700
On Sep 30, 2004, at 4:28 AM, 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").
At this point, which menu bar is visible? It sounds like X11.app is not
the front process, which means its menus won't be visible and its
windows won't be able to have focus.
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.
Your application should probably call Carbon's SetFrontProcess(X11.app)
in addition to the usual X11 window manipulations. That will bring
X11.app forward and allow X11.app's windows to receive focus.
For the Dock clicks, you'll need the application that owns the Dock
icon to cooperate. Either that application can call
SetFrontProcess(X11.app) itself, or it can communicate with your X11
program through some channel and tell the X11 program to raise its
windows and call SetFrontProcess(X11.app).
--
Greg Parker email@hidden Not an X11.app developer
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden