Subject: Re: FVWM: Somthing broken in fvwm-snap-20040608!

From: Scott Smedley <[email-masked]>
Date: Wed, 9 Jun 2004 00:39:19 +1000

Note: this thread moved to fvwm-workers list.

:   - Key binding in the Root context won't work, for example
:     Key F1      R    M    Exec exec rxvt
:     it won't start rxvt but pop up the default menu instead.
:   - StrokeFunc in the Root crashes X, for example:
:     Mouse 1     R    N    StrokeFunc DrawMotion FeedBack StrokeWidth 2
:     now when you click the Root, you'll exit X and there is no error msg.

I've not used Stroke, but I changed the mouse binding to:

Mouse 1 R N Echo myMouse1BindingInvoked

for testing.

In both instances I found the bindings to be ignored. This was because
FVWM defines default bindings for the F1 key & left mouse button. They are:

Key F1 R A Popup MenuFvwmRoot
Mouse 1 R A Menu MenuFvwmRoot

If I do a:

Key F1 R A -
Mouse 1 R A -

Both bindings are successfully invoked when expected.

So the question is: what's changed?

The binding list used to use the _earliest_ matching binding. The
current implementation uses the _latest_ matching binding. It would be
trivial to make it utilise the _earliest_ binding, however I am undecided
if this is really the behaviour we want.

The current & previous implementation match on (in this example)
F1 bindings with 'A' (any) modifier or 'M' (meta) modifier.

ie. they match on _both_ bindings, its just which one appears first/last
(depending on implementation) in the internal binding list that gets invoked.

Should I extend the binding-comparison code to discrimiate on the
modifiers further? (Dominik, I hope you're reading this? :)

ie. choose 'M' modifier bindings (if they exist) before 'A' modifier
bindings if the 'M' modifier is actually pressed.

I should have renamed this thread "degrees of matchingness"! :)

SCoTT. :)
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Scott Smedley <[email-masked]>
Date: Wed, 9 Jun 2004 00:45:54 +1000

: > So the question is: what's changed?
: > 
: > The binding list used to use the _earliest_ matching binding. The
: > current implementation uses the _latest_ matching binding. It would be
: > trivial to make it utilise the _earliest_ binding, however I am undecided
: > if this is really the behaviour we want.

Damn. Got that the wrong way 'round.

The binding list used to use the _latest_ matching binding. It currently
uses _earliest_ matching binding.

I'm sure you knew what I meant anyway.

SCoTT. :)

---

From: Chris Ross <[email-masked]>
Date: Tue, 08 Jun 2004 13:21:20 -0400

I would argue that while it's harder to do, it should prefer
most specific, rather than either earliest or latest.  ie, if
something requests M, and something else A, then it should
respond to M, and only A when there isn't a specific binding
for the modifiers in use.

   Should "M" match when Ctrl-Meta is down?  Does that work
currently?  Or will that match only Meta?  This complicates
the above, but it can be done either way...

                  - Chris

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 8 Jun 2004 19:39:49 +0200

(please put replies below the quoted text on this list)

> the above, but it can be done either way...

In fvwm, the last command always wins, be it a binding or a style.

Ciao

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]

---

From: Scott Smedley <[email-masked]>
Date: Thu, 10 Jun 2004 00:43:06 +1000

> :     now when you click the Root, you'll exit X and there is no error msg.

Reverted to previous behaviour which was to activate the _last_
matching binding.

The stroke problem should be fixed too.

You can try it out in CVS or wait for snap-20040610.

SCoTT. :)