TWM is buggy. Does that mean that our xorg is slightly broken?

Hello all,

I have set up a very basic POS system using FreeBSD 8.2-RELEASE and noticed that the following added to .twmrc causes mouse button presses to no longer propagate to the underlying window (such as an xterm).

Code:
Button1= : window : f.function "raise-n-focus"
Function "raise-n-focus" {
f.raise
f.focus
}

This code snippet is suggested by the twm developer (LaStrange) so should work.
http://www.lastrange.com/work/twm.pdf.

The code above raises a window when clicked.. but unfortunately I then cannot actually use the window because I cannot send it clicks :(.

Does anyone else experience this?

Cheers
 
Try:
Code:
Function "raise-n-focus" { f.raise f.focus }

Button1= : window : f.function "raise-n-focus"

I'm guessing the function has to be defined before it can be called.
 
Hello,

Thanks for your suggestion however both code snippets work (i.e the window is focused and brought to the top). However the original problem still remains. The click event is "absorbed" by the TWM function and thus does not get sent to the contained client window.

So I can focus windows, however I cannot actually click any buttons within them :/
 
Unclear to me whether you are actually using the mouse or programming the clicks. If the former, a few of the xterm/aterm/etc I use refuse to be clicked in unless one clicks elsewhere then back again, sometimes several times. (Happens about every other day, not often enough to note which one it is).
 
Yes, I am clicking it with my mouse.

The mouse click just doesn't seem to get through to the client. It can also just display a busy waiting cursor when I try to click which then disappears when I release the mouse buton.

Frankly I am just going to go with the idea that twm is really not meant for this as a "click-to-focus" solution so I decided to just make do with Mwm instead.

Thanks for the suggestions all.
 
kpedersen said:
Yes, I am clicking it with my mouse.

The mouse click just doesn't seem to get through to the client. It can also just display a busy waiting cursor when I try to click which then disappears when I release the mouse buton.

Frankly I am just going to go with the idea that twm is really not meant for this as a "click-to-focus" solution so I decided to just make do with Mwm instead.

Thanks for the suggestions all.

Why not use xev and see what's happening? Get me the output if you like, and I can take a look.

-- Thomas Adam
 
Hello,

Before I changed to mwm, I hacked on the code to see what was happening in Twm and the logic was such that the ButtonPress and ButtonRelease events were being intercepted if the above config is specified.

The software that I plan to be running on this POS system is written in Motif, so Mwm will already be installed anyway. Plus it means that I can use MWM_HINTS so modifying Twm can wait for another day ;)

In any case, many thanks for the offer.
 
Back
Top