Hello, there. I'm currently working on an implementation of XEmbed, and have run into a problem with XSetInputFocus. Please redirect me to the right forum if this was posted to the wrong place.
What I'm troubled with is Keyboard Focus, described here: http://www.freedesktop.org/standards/xembed-spec/0.5-html/ar01s03.html "In detail, the topmost embedder creates a not-visible X Window to hold the focus, the focus proxy. (It might be a 1x1 child window of toplevel located at -1,-1.) Since the focus proxy isn't an ancestor of the client window, the X focus can never move into the client window because of the mouse pointer location. In other words, whenever the outer window is activated (receives the X input focus), it has to put the X focus on the FocusProxy by calling XSetInputFocus()." focusProxy-> *____________ |A | | ______ | | |B | | | |______| | | | |____________| So I have a window A with a focusproxy child window, measuring 1x1 at -1,-1, and I call XSetInputFocus on this focusproxy with RevertToParent. -> To emphasize, B isn't a child window of A (in XEmbed, the "embedder"). B is a window created by a seperate application, which has called XReparentWindow to reparent B into A. So B is the XEmbed "client". B actually fully covers A, so the size difference in my art is just for clarity. The problem is that the focusproxy receives all keyboard events only if the mouse pointer is outside window A (the embedder window). On or outside the window decorations, doesn't matter as long as the mouse pointer is outside window A. If the mouse pointer is inside window A, window B gets the keyboard events directly. If I move the mouse pointer out of the window A again, my focusproxy gets keyboard events again. Installing an x11 event filter gives me the EnterNotify and LeaveNotify for A and B as I cross the border of window A. I also get a KeymapNotify, and I guess (having no clue really) that this is X11's way of telling me that A isn't getting keyboard events anymore. So my question is this: Is the XEmbed protocol broken, is my X11 server broken, or is my code broken, and in which way. Any help will be greatly appreciated, Andreas :-) -- Andreas Aardal Hanssen _______________________________________________ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel