Subject: FVWM: extra mouse button cannot be used

From: Erik Steffl <[email-masked]>
Date: Sun, 27 Apr 2003 02:13:27 -0700

I have a logitech mouse with four buttons and a wheel. all the 
buttons work when tested using xev:

   left button:		button 1
   pressing wheel:	button 2
   right button:		button 3
   turning wheel:	buttons 4&5
   side button:		button 6

   buttons 1 - 5 work as expected in fvwm but when I try to bind 
something to side button (6) it doesn't work and I get this error message:

[FVWM][ParseBinding]: <<ERROR>> Illegal mouse button in line 6 
WTSFI0123456789 N  rrrFunction

   here are relevant lines from the line from config file:

Mouse 6 WTSFI0123456789 N  testFunction

DestroyFunc testFunction
AddToFunc   testFunction
+ "M" Move
+ "M" Raise
+ "C" RaiseLower

   if I use e.g. 2 instead of 6 there's no error message and it works as 
expected.

   fvwm verion is 2.4.15 (debian unstable)

   I used to have the button 6 working before, I don't remember which 
fvwm version... (I don't have that config file anymore but I don't 
remember doing anything special)

   any ideas? TIA!

	erik

--
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: [email-masked]
Date: Sun, 27 Apr 2003 13:01:10 +0200

> remember doing anything special)

In versions before 2.5.x this sometimes worked, but not reliably
and only by coincidence.

  2.4.x:

    Buttons 1 to 5 fully supported
    Buttons 6 and above not supported at all

  2.5.x:

    Buttons 1 to 5 fully supported
    Buttons 6 to 9 partially supported (as far as X allows)
    Buttons 10 and above not supported at all

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
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: Erik Steffl <[email-masked]>
Date: Sun, 27 Apr 2003 22:23:33 -0700

> On Sun, Apr 27, 2003 at 02:13:27AM -0700, Erik Steffl wrote:
...
>>WTSFI0123456789 N  rrrFunction
...
>     Buttons 10 and above not supported at all

   wow! I had it working before, I think it was 2.2.x, I thought it's 
not a big deal, a button is a button is a ... any chances it will be 
supported in 2.4?

   what do you mean by "partially supported"? can you bind functions to 
click/doubleclick/drag in 2.5? [any docs on this?]

   thanks,

	erik

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 28 Apr 2003 09:46:36 +0200

> not a big deal, a button is a button is a ... any chances it will be 

You can manually edit the file libs/defaults.h and increase the
value of the NUMBER_OF_MOUSE_BUTTONS macro from 5 to 9.  Do *not*
change the DEFAULT_ALL_BUTTONS_MASK and
DEFAULT_ALL_BUTTONS_MOTION_MASK macros, though.

> click/doubleclick/drag in 2.5? [any docs on this?]

X does not support all operatios on the additional mouse buttons
because it uses a bit mask to select events that drag the pointer
with a button held.  It has only five bits reserved for the
buttons.  There are a couple of things that do not work at all or
no reliably with buttons >= 6:

  - Interactive Move/Resize
  - Navigating menus
  - Running complex functions
  - The 'M' context in complex functions
  - Commands that change the focus or raise windows
  - Root window bindings
  - Stroke bindings

Some of these problems come only from the fact that fvwm often
waits for all buttons to be released before continuing.  These
problems would go away if we rewrite the function that checks
mouse button states without relying on the masks.

Bye

Dominik ^_^  ^_^