Re: /* STUPID QUESTION */
Re: /* STUPID QUESTION */
- Subject: Re: /* STUPID QUESTION */
- From: Sean Ahern <email@hidden>
- Date: Fri, 16 May 2003 11:37:21 -0700
Matthew Klahn wrote:
> My point was that we cannot modify CodeTek VirtualDesktop to get
> information that is not provided by Apple's X11 windows, such as the
> title of the window, nor can we act upon them in the same way that we do
> Carbon/Cocoa windows, such as giving them focus (for the
> Focus-Follows-Mouse feature, and during desktop switching), for another
> example.[1]
...
> [1] Well, _maybe_ we can, and we are researching how to do this. However
> it appears to be very difficult, since we have to get a handle to the
> actual X server and find the info we need (such as window titles, etc.)
> or perform the necessary actions via the X Window API (something that
> we're not familiar with, and depends on how well each application
> conforms to the X Window standards; for example, it's up to the
> application to register window titles with the X Server, etc.). We've
> done some preliminary analysis of this, but are stuck on some unresolved
> issues.
Have you brought in an X11 expert to consult with you? If you *can* get a
pointer to the X11 Display, these are fairly common things. In general,
you use XFetchName to get the window title (if it's set by the application,
as you mention), XGetClassHint to get the application name and class,
XGetWMHints to get window manager information, XGetWindowProperty to get a
heck of a lot of other things, and XQueryTree to determine window
parentage. Taken as a whole, that information can characterize most
applications.
As for setting focus, that's a bit tougher, considering that the window
manager wants to mediate that. However, the basic call is XSetInputFocus.
I have yet to try it with X11.app and quartz-wm, though. You might be able
to fake setting window focus with judicial use of XWarpPointer. If all
else fails, you might be able to fake mouse movement and focus events
through use of the XTEST X11 extension, which X11.app supports.
-Sean
__
email@hidden
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/x11-users
X11 for Mac OS X FAQ: http://developer.apple.com/qa/qa2001/qa1232.html
Report issues, request features, feedback: http://developer.apple.com/bugreporter
Do not post admin requests to the list. They will be ignored.