shawn@litsun8.litsun.epfl.edu (Shawn Koppenhoefer) (11/30/90)
Hi everyone, I've got a teeny problem with the odd application with an Openlook X window. It seems that some applications which should accept keyboard input when my cursor is in the window DON't! A prime example is xpostits. When I bring up a postit note to type into all I get is annoying beeps... like when you aren't currently in a window and you hit the keyboard keys. anyone have a clue as to the solution? -- _____________________________________________________________________________ | shawn@litsun.epfl.ch -.- KLEIN BOTTLE FOR SALE ... \####### | Shawn Edwin Koppenhoefer \_/ ... enquire within \###### | LIT-EPFL (Ecole Polytechnique Federal De Lausanne)___________________\#####
rhaar@rcsrlh.GMR.COM (Bob Haar CS50) (12/01/90)
In article <SHAWN.90Nov30143236@litsun8.litsun.epfl.edu>, shawn@litsun8.litsun.epfl.edu (Shawn Koppenhoefer) writes: |> I've got a teeny problem with the odd application with an Openlook |> X window. |> It seems that |> some applications which should accept keyboard input when my cursor |> is in the window DON't! A prime example is xpostits. When I bring |> up a postit note to type into all I get is annoying beeps... like |> when you aren't currently in a window and you hit the keyboard keys. |> |> anyone have a clue as to the solution? Me too, except that I don't get a beep. My example: MIT X11 xlife program running under OpenWindows 2.0, olwm window manager on Sun SPARC1+, SunOS 4.1 . The xlife program opens a window. I can use the mouse buttons turn on/off cells or change the viewpoint, but keyboard input never seems to get to the program. I have noticed that the "banner" area at the top of the window that highlights for the window currently getting keyboard input (is this called keyboard focus?) never turns on. I can move/resize/ open/close the window, but not take to the program. This same executable works properly on another SUN with an identical setup except that twm is used instead of olwm. Any suggestions ? (Don't say to use twm or X11. That isn't an option for me.) Bob Haar CSNET: HAAR@GMR.COM UUCP: uunet!edsews!rphroy!rcsrlh!rhaar Computer Science Dept., G.M. Research Laboratories DISCLAIMER: Unless indicated otherwise, everything in this note is personal opinion, not an official statement of General Motors Corp.
dave@cs.olemiss.edu (David E. Johnson) (12/01/90)
To get the keyboard focus to go to all applications try the following line in your .Xdefaults (or whatever): OpenWindows*FocusLenience: true -- David E. Johnson Department of Computer Science ** Title: Systems Programmer The University of Mississippi ** Telephone: (601) 232-7396 336 Weir Hall ** Internet: dave@cs.olemiss.edu
shawn@litsun8.litsun.epfl.edu (Shawn Koppenhoefer) (12/03/90)
David> To get the keyboard focus to go to all applications try the following David> line in your .Xdefaults (or whatever): David> OpenWindows*FocusLenience: true yup.... that solved the problem really well. :-) yeah! I've noticed another difference now too! When I drag-mouse across a section of text in one window, I can now actually pick up the block of text and drag it into another window! wierd! (but nice!). -- ___________________________________________________________________________ | shawn@litsun.epfl.ch -.- KLEIN BOTTLE FOR SALE ... \####### | Shawn Edwin Koppenhoefer \_/ ... enquire within \###### | LIT-EPFL (Ecole Polytechnique Federal De Lausanne)_________________\#####
bill@polygen.uucp (Bill Poitras) (12/04/90)
In article <1990Nov30.190816.16538@cs.olemiss.edu> dave@cs.olemiss.edu (David E. Johnson) writes: >To get the keyboard focus to go to all applications try the following >line in your .Xdefaults (or whatever): > > OpenWindows*FocusLenience: true > > I was told this a long time ago. I was also told to make sure I was setting the WM_HINTS property on my window, so the 'input' element of that property was 'True'. I did, didn't fix the problem. The FocusLenience works, but is unacceptable to people who use the program. They want a code change to fix it. +-----------------+---------------------------+-----------------------------+ | Bill Poitras | Polygen Corporation | {princeton mit-eddie | | (bill) | Waltham, MA USA | bu sunne}!polygen!bill | | | | bill@polygen.com | +-----------------+---------------------------+-----------------------------+
rhaar@rcsrlh.GMR.COM (Bob Haar CS50) (12/04/90)
In article <1990Nov30.190816.16538@cs.olemiss.edu>, dave@cs.olemiss.edu (David E. Johnson) writes: |> To get the keyboard focus to go to all applications try the following |> line in your .Xdefaults (or whatever): |> |> OpenWindows*FocusLenience: true |> I tried this, but it doesn't work - at least it doesn't solve my problem. It does have the effect that keyboard focus follows the cursor as you move the mouse. However, some X11 programs still don't get keyboard focus. They never see keystrokes and the "banner" region never highlights to show keyboard focus. my example - xlife compiled and running on a Sun Sparc 1+, SunOS 4.1, OpenWindows 2.0, olwm window manager. The same executable executable works correctly on another Sparcstation that is identical, except that he uses twm rather than olwm. This suggests either as problem with olwm, or some difference is defaults or configuration files. Bob Haar CSNET: HAAR@GMR.COM UUCP: uunet!edsews!rphroy!rcsrlh!rhaar Computer Science Dept., G.M. Research Laboratories DISCLAIMER: Unless indicated otherwise, everything in this note is personal opinion, not an official statement of General Motors Corp.
shawn@litsun8.litsun.epfl.edu (Shawn Koppenhoefer) (12/07/90)
Bob> |> To get the keyboard focus to go to all applications try the following Bob> |> line in your .Xdefaults (or whatever): Bob> |> OpenWindows*FocusLenience: true Bob> I tried this, but it doesn't work - at least it doesn't solve my Bob> problem. It does have the effect that keyboard focus follows Bob> my example - xlife compiled and running on a Sun Sparc 1+, SunOS 4.1, i also still have this problem with xpostit though the lenience thingy help *some* of my windows.... i still haven't heard any other ideas. -- ___________________________________________________________________________ | shawn@litsun.epfl.ch -.- KLEIN BOTTLE FOR SALE ... \####### | Shawn Edwin Koppenhoefer \_/ ... enquire within \###### | LIT-EPFL (Ecole Polytechnique Federal De Lausanne)_________________\#####
erc@pai.UUCP (Eric Johnson) (12/07/90)
In article <39649@rphroy.UUCP>, rhaar@rcsrlh.GMR.COM (Bob Haar CS50) writes: > In article <1990Nov30.190816.16538@cs.olemiss.edu>, dave@cs.olemiss.edu > (David E. Johnson) writes: > |> To get the keyboard focus to go to all applications try the following > |> line in your .Xdefaults (or whatever): > |> > |> OpenWindows*FocusLenience: true > |> > > I tried this, but it doesn't work - at least it doesn't solve my > problem. It does have the effect that keyboard focus follows > the cursor as you move the mouse. However, some X11 programs still > don't get keyboard focus. They never see keystrokes and the "banner" > region never highlights to show keyboard focus. > > my example - xlife compiled and running on a Sun Sparc 1+, SunOS 4.1, > OpenWindows 2.0, olwm window manager. The same executable executable > works correctly on another Sparcstation that is identical, except > that he uses twm rather than olwm. > > This suggests either as problem with olwm, or some difference is > defaults or configuration files. > > Bob Haar CSNET: HAAR@GMR.COM UUCP: uunet!edsews!rphroy!rcsrlh!rhaar > Computer Science Dept., G.M. Research Laboratories > DISCLAIMER: Unless indicated otherwise, everything in this note is > personal opinion, not an official statement of General Motors Corp. The real issue here is that the arbiter of what well-behaved X Window programs need to do, the Inter-Client Communications Conventions Manual (or ICCCM) has not only changed, but it's been adopted by most recent window managers. What this did is cause a lot of old X programs to no longer run properly. I won't argue about whether these programs are "broken" or not (the point is moot to me). Anyway, the problem is not your window manager (unless something is seriously wrong). The problem is that the window manager demands your X applications follow certain rules and the X application isn't. You'll find this a lot using code written for X11 Release 3 on an R4-based system. (OpenWindows 2.0 is based on X11 Release 4.) Here's what you need to do. When the X application sets it's Window Manager Hints, it needs to set the InputHints flag to True. Some Xlib code fragments are below: Display *Display; Window window; XWMHints *wmhints; /* Allocate wmhints, using malloc(), XMalloc() or XAllocWMHints()... */ wmhints->input = True; wmhints->flags = InputHint; /* OR your other hints here as well... */ XSetWMHints( display, window, wmhints ); /* free wmhints... */ The code will probably be setting a number of hints, so use an OR (|) operation to OR together the various hint bit masks in the flags field. This problem is in the top ten of hassles in programming X. For more information on the above code, see pages 38-39 in Advanced X Window Applications Programming: Johnson, Eric F. and Kevin Reichard, Advanced X Window Applications Programming, MIS: Press, Portland, OR, 1990. ISBN 1-55828-029-4. Now, if your programs are based on a toolkit, like Xaw (Athena), Xm (Motif) Xt+ (or OLIT--Open Look) or XView (Open Look) you will need to do something different. (I haven't had any probelms with Motif code, even running an R3-based Motif program on an R4-based server.) The general place to look is for something similar to "InputHint" or "inputHint"--you'll want to set whatever to True. Hope this helps, -Eric -- Eric F. Johnson phone: +1 612 894 0313 BTI: Industrial Boulware Technologies, Inc. fax: +1 612 894 0316 automation systems 415 W. Travelers Trail email: erc@pai.mn.org and services Burnsville, MN 55337 USA