Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines From: dshr@eng.sun.COM (David Rosenthal) Newsgroups: comp.windows.x Subject: Re: Setting input focus to terminal window Message-ID: <9103221516.AA19243@devnull.Eng.Sun.COM> Date: 22 Mar 91 15:08:32 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 25 > There's something I'm missing regarding the management of keyboard > focus in the presence of a manager. I have a program in which I want > to switch focus back to the terminal window from which the program > is running (away from the work window the program itself has created) > so that the user can type in some new parameters; the switch is triggered > by some event in the main window (mouse-click or key-press). (...Okay, > I know that the "proper" way to do it would be to pop up a dialog window > using one of the toolkits, but this program is a conversion from an old > X10 one, and I'm trying to keep it as close as I can to the original > for now.) > The ICCCM Section 4.1.7 [page 524 of the Digital Press 2nd edition] describes four possible models of input focus handling for non-window-manager clients. They all assume that if a client sets the input focus, it does so to a window that it itself owns. This should probably be stated explicitly. Attempts by one client to set the input focus to a window belonging to another client are unlikely to succeed - you are attempting to usurp the functions of the window manager, and you are trying to wire in to your program details of the way a particular window manager works. I'm afraid that you will have to make the effort to do it the proper way. David.