Subject: FVWM: Trouble with libstroke/thumb button

From: Markus Mårtensson <[email-masked]>
Date: Fri, 10 Aug 2001 09:15:40 +0200

Hi!

After trying out fvwm 2.4.0 a while, I finally came up with a use for
my "thumb button" (Logitech MouseMan+). My thought was that if I have to 
press alt to be able to draw a gesture, then I might as well press 
ctrlalt-enter to open a terminal and skip libstroke altogether.
But if I, on the hand, was able to use only the mouse to draw gestures, 
then it would suddenly a useful feature.

Enter the "thumb button". Counting the mouse wheel as two buttons, there
was sadly no mouse button left for fvwm to detect (the old X heritage
of a maximum of five buttons). I thought I'd let the program imwheel 
map button clicks to keystrokes for me. Now we're getting to my
problem.

Mouse   3       W       M       StrokeFunc FeedBack DrawMotion
StrokeWidth 2
Key     Home    A       CS      StrokeFunc FeedBack DrawMotion 
StrokeWidth 2 NotStayPressed

Using the alt+mouse3 works great. DrawMotion works and the functions are
run. Using the "thumb key", or pressing "Ctrl-Shift-Home" directly, 
only DrawMotion works... _no_ function is run. Appending NotStayPressed
to the alt+mouse3 line works fine, I just click a mouse button after 
I'm done with the gesture. No matter what I do after drawing a "thumb 
gesture", I can't get a function to launch.

Thoughts anyone?

/ Markus Mårtensson

-- 
o=------------------=o=-----------------------------=o=---------------------=o
 Markus Mårtensson   | [email-masked]             | Admin @ acc.umu.se
 Vittervägen 176     | [email-masked]              | Tel. +46 (0)90 194043
 907 51  UMEÅ        o http://www.acc.umu.se/~mortis o Cel. +46 (0)70 3749721 
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Sat, 11 Aug 2001 00:20:56 +0000

> gesture", I can't get a function to launch.

First, determine whether X sees your thumb button. Fire xev and press
this button to see whether it generates any event.

It is possible to configure XFree 4.x to work with more than 5 buttons.
you may optionally remap button numbers using something like:

  xmodmap -e "pointer = 1 6 3 2 4 5"

then, supposing you mapped your thumb button to mouse button 4, use:

  Mouse 4 A A StrokeFunc FeedBack DrawMotion StrokeWidth 2

Actually, it is possible to make it work even if thumb button has number
greater than 5, for example 6.  For this to work you may apply the
following one-line patch, so that fvwm may work with any button number:

In file fvwm/bindings.c replace this line and reinstall:
-     if (button < 0 || button > NUMBER_OF_MOUSE_BUTTONS)
+     if (button < 0 || button > 9)

Then you may do something like:

  Mouse 6 A A StrokeFunc FeedBack DrawMotion StrokeWidth 2 NotStayPressed

But remember to use NotStayPressed, because X does not support dragging
of buttons with numbers greater than 5.

Continue to ask if you still have problems.

Regards,
Mikhael.