Path: utzoo!utgpu!watmath!att!bellcore!rutgers!tut.cis.ohio-state.edu!bloom-beacon!goldhill.COM!jne From: jne@goldhill.COM Newsgroups: comp.windows.x Subject: more questions on keyboard focus Message-ID: <8908081617.AA01554@godzilla.goldhill.com> Date: 8 Aug 89 16:17:51 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 35 I have a reasonably tricky application regarding keyboard focus and am not quite sure what to do. I am building a lisp interface to an X-based window system. In general, I want the window manager to set the focus to one of my windows (which I may pass to a different one on my windows using the WM_TAKE_FOCUS mechanism). This all works great using the ICCCM "Locally Active Input" model which allows me to set focus to any of my client's windows as long as my client already has the focus. Here's the problem. From my lisp listener, which is not one of my client's windows (it's the xterm from which I invoked lisp), I can enter: (SELECT *WINDOW-1*) which means that I want *WINDOW-1* to have the focus when the window manager wants any of my windows to have the focus. If I accomplish this by XSetInputFocus of the shell associated with *WINDOW-1*, I tend to get Bad Match errors. I assume this is because 1) the window isn't visible, or 2) none of my windows has the focus at the time of XSetInputFocus call, violating the "Locally Active Input" definition. Do I have to track FocusIn/FocusOut on all my windows to see if my client has the focus? Do I need visible_interest set for my shell's class to determine if it is ok to XSetInputFocus? Any help would be greatly appreciated. Jeff Eisen Gold Hill Computers