Re: Grabbing Window focus for X11
Re: Grabbing Window focus for X11
- Subject: Re: Grabbing Window focus for X11
- From: robert delius royar <email@hidden>
- Date: Thu, 30 Sep 2004 15:57:55 -0400 (EDT)
- Organization: An Apple OS X end user
- Priority: NEW
Thu, 30 Sep 2004 (10:03 -0700 UTC) Sean Ahern wrote:
robert delius royar wrote:
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.
My explanation is confusing. But I already use XSetInputFocus. The problem
is not the X system, the problem is that the launch takes OSX's focus away
from the X11 controlled windows. So I think I need some OSX NS or Carbon
call to say, "make the window which I own get focus." If I let the startup
Platypus script exit with the XTerm still running (using '&'), then focus
does go to my window, but then the icon in the Doc no longer has the
triangle beneath it.
I'll look at the pages you listed, however, to see if there is more than
Mapping, Raising, and SetInputFocus that I need. The odd thing is that the
code I am trying works in fspanel to accomplish this, but I believe that is
a result of my clicking on nspanel raising X11 itself which then pays
attention to the Raises and InputSelects to bring that window forward in the
underlying system's (OS X's) sense of what has focus on the screen.
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.
-Sean
__
email@hidden
925-422-1648
--
Dr. Robert Delius Royar Associate Professor of English
Morehead State University Morehead, Kentucky
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden