jacquemin-michel@CS.YALE.EDU (Michel Jacquemin) (01/30/89)
I am begining to use Xlib, and I have a simple question about a problem I have, with X11R3 (with purdue patches) running on a Sun 3/50: My program is doing XSelectInput(.,.,KeyPressMask) on several windows of my display. It receives KeyPress events for any kind of window except xterm windows, and that happens whether or not a window manager is running. There is no problem with KeyRelease events. Is that a known bug, or is there an explanation (and a work-around) for that behavior? Michel Jacquemin (jacquemin@cs.yale.edu)
rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (01/30/89)
My program is doing XSelectInput(.,.,KeyPressMask) on several windows of my display. It receives KeyPress events for any kind of window except xterm windows I suspect you'll get similar behaviour for most Xt clients that accept keyboard input. The "problem" is that xterm (and other clients) have subwindows that have KeyPress selected for (but typically not KeyRelease), and they get "first dibs" at the event. Go back to the Xlib or Protocol doc and read about the window hierarchy and device event propagation.
swick@ATHENA.MIT.EDU (Ralph R. Swick) (02/03/89)
> It receives KeyPress events for any kind of window > except xterm windows, and that happens whether or not a window manager > is running. There is no problem with KeyRelease events. > > Is that a known bug, or is there an explanation (and a work-around) > for that behavior? Not a bug; you're probably not using the real window from which xterm reads it's key events. Sounds like you're hacking anyway; if you really want to know how to do it for xterm, send me private mail.