cbn@wiley.UUCP (Chris Newton) (10/21/89)
Question for those of you familiar with X Windows on a DEC 3100 Workstation: (We are novices in the DEC X Windows world, so please bear with me...) The normal mode of operation in this environment is to set the current keyboard focus by clicking in the window of choice. When a window is "clicked" it's header turns black, indicating that it will receive all keyboard input, regardless of the cursor position. (This is similar to the "click-to-type" mode in SunWindows.) This works fine for all the X applications DEC provides. (Although we poor humans take a while getting used to this way of doing things! :-) ) We have an application which we are attempting to port from Suns to the 3100. It is written using Athena widgets (not DEC widgets). It comes up on the 3100, but NEVER gets the input focus. The window header never turns black and all keyboard input goes to the shell from which the application was invoked. We have managed to get keyboard input into some of the popup dialogs by calling XSetInputFocus() immediately after their respective XtPopup() calls, but this seems to me to be a kludgy solution, at best. Attempts to call XSetInputFocus() on the root widget or its immediate child (a form) end in "parameter mismatch" errors from the X Server. Is there a simple and obvious way we can get these sorts of applications to behave like native DEC applications with respect to keyboard input? Can we do this without changing source code? If not, doesn't this smack in the face of X Windows "portability", since this code runs fine on a Sun? Thanks in advance for any answers. -- Chris B. Newton TRW - Coyoteworks - Redondo Beach, Ca. ---------------------------------- USENET: wiley!cbn
kent@gnomee.pa.dec.com (Christopher A. Kent) (10/22/89)
Make sure you're setting XtNinput on your widgets, so they'll take input focus if offered. Just because it runs on the Sun doesn't mean it's portably (or correctly) written. Chris Kent Western Software Laboratory Digital Equipment Corporation kent@decwrl.dec.com decwrl!kent (415) 853-6639
marbru@auto-trol.UUCP (Martin Brunecky) (10/23/89)
In article <5868@wiley.UUCP> cbn@wiley.UUCP (Chris Newton) writes: > >We have an application which we are attempting to port from Suns to the 3100. >It is written using Athena widgets (not DEC widgets). It comes up on the >3100, but NEVER gets the input focus. The window header never turns black and >all keyboard input goes to the shell from which the application was invoked. > Looks like the application writer ignored shell resource XtNinput (accept input focus) Many older applications do that, and you can get along with them as long as older, less law-obiding window managers are used. You can get along by putting a line: *input: True into your .Xdefaults. No the best solution, but... Or you can do the same in the application resource file (if there is any or you know the application name/class), or you can fix the application. -- ############################################################################### Martin Brunecky, Auto-trol Technology Corporation, 12500 North Washington Street, Denver, CO-80241-2404 (303) 252-2499 ncar!ico!auto-trol!marbru
swick@ATHENA.MIT.EDU (Ralph R. Swick) (11/13/89)
> Is there a simple and obvious way we can get these sorts of applications to > behave like native DEC applications with respect to keyboard input? > Can we do this without changing source code? Put '*Input: True' in one of your resource files. If you are the site manager, then /usr/lib/X11/app-defaults/<application class> is the best place to add this. Xrdb will suffice, too.