Article View: ba.windows.x
Article #127Re: How to get twm to do input focus and raising like mwm?
From: David Whitney - GDP
Date: Mon, 06 Jan 1992 22:14
Date: Mon, 06 Jan 1992 22:14
44 lines
2393 bytes
2393 bytes
In article <kma09pINNpgh@agate.berkeley.edu>,
forrest@postgres.Berkeley.EDU (Jon Forrest) writes:
|>I like the way mwm does input focus and raising. (I like to be able
|>to click anywhere in a window and have the window raise to the top
|>and get input focus). My first attempts to make twm work this way
|>failed miserably. Does anybody have the magic .twmrc commands to
|>make this happen?
This is the (hopefully familiar) way that .twmrc sets button events:
#----------------------------------
#Button = KEYS : CONTEXT : FUNCTION
#----------------------------------
Button1 = m : window|title|frame : f.raise
Button2 = m : window|title|frame : f.move
Button3 = m : window|title|frame : f.lower
This bit will cause Alt-button1 to raise the current window. I would
advise against having a simple button click raise the window because
then you might get Twm and the X client fighting over what Button 1
means. It may be possible, but I don't trust anything to work the way
it's "suppose" to.
To raise and lock the focus you need another function def in .twmrc such
as the following. I personally don't like fixing the focus, but to each
his/her own.
Function "raise-n-focus"
{
f.raise
f.focus
}
-Dave
---------------------------------------------------------------------------
David Whitney | Cooper: Wanna know why I'm whittling?
whitney@ames.arc.nasa.gov | Truman: OK, I'll bite. Why are you whittling?
| Cooper: Because that's what you do in a
Sterling Software | town where a yellow light still means
NASA Ames, Mtn View, CA | slow down, not speed up.
Nobody's opinion but mine.
Technical Details
Message-ID:
<1992Jan6.221409.2465@riacs.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!sun-barr!ames!riacs!athena.arc.nasa.gov!whitneyReferences:
<kma09pINNpgh@agate.berkeley.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10e286,57e84b357ba7083a X-Google-Attributes: gid10e286,public X-Google-ArrivalTime: 1992-01-06 14:24:03 PST Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!ames!riacs!athena.arc.nasa.gov!whitney From: whitney@athena.arc.nasa.gov (David Whitney - GDP) Newsgroups: ba.windows.x Subject: Re: How to get twm to do input focus and raising like mwm? Message-ID: <1992Jan6.221409.2465@riacs.edu> Date: 6 Jan 92 22:14:09 GMT References: <kma09pINNpgh@agate.berkeley.edu> Sender: news@riacs.edu Reply-To: whitney@athena.arc.nasa.gov (David Whitney - GDP) Distribution: ba Organization: Research Institute for Advanced Computer Science Lines: 44