Path: utzoo!attcan!uunet!mcsun!hp4nl!dutrun!dutncp8!adri From: adri@dutncp8.tudelft.nl (Adri van Woerkom (A.B.)) Newsgroups: comp.windows.x Subject: Re: Cannot focus on popup window? Message-ID: Date: 6 Aug 90 15:02:09 GMT References: <14276@wpi.wpi.edu> Sender: news@dutrun.UUCP Lines: 27 daven@wpi.wpi.edu (David N Nedde) writes: >I have a popup shell in my program that is of class >overrideShellWidgetClass. In the popup I create a text widget. >However, the focus isn't given to the popup widget. When I change the >class to just shellWidgetClass or transientShellWidgetClass the DEC >window manager decorations on the popup. Using the decorations, I can >select the popup and give it the focus, however, I don't want a border >on my popup! Is there someway to get the focus in a popup shell >without having a window decorations or is the DEC window manager >always going to get in my way? Your window manager is never informed of the existance of an overrideShell (that's just what an overrideShell is all about) so it cannot set keyboard focus to it. Instead you must get the focus yourself when the widget pops up. This can be done by registering an expose event handler for the text widget that does XSetInputFocus or XGrabKeyboard for your text widget's window. ---------------------------------------------------------------------------- A.B. van Woerkom, adri@dutncp6.tudelft.nl Faculty of Applied Physics, Department Physics Informatics, section Computational Physics, Delft University of Technology, Delft, The Netherlands -----------------------------------------------------------------------------