Subject: FVWM: Raise/Move not working from menu or keypress

From: Rob Windsor <[email-masked]>
Date: Tue, 17 Dec 2002 19:59:27 -0600

I've recently installed XFree-4 on a laptop and slapped fvwm-2.5.3 on it.

I copied over my trusty .fvwm2rc (carryover from fvwm-1.22 days) and made
the standard system-specific tweaks.  One disappointing item of note is that
my "Move" and "Resize" (F2 and F4) key mappings don't work.

The relevant lines in the .fvwm2rc file look like:

Key      F2     A       N       Move-or-Raise
Key      F3     A       N       Menu Window-Ops
Key      F4     WTFS    N       Resize-or-Raise
Mouse    0      1       A       Menu Window-Ops2 Close
Mouse    1      TS      A       Move-or-Raise
Mouse    1      F       A       Resize-or-Raise
Mouse    2      TSF     A       Resize-or-Raise
Mouse    2      R       A       Menu Window-Ops Nop
AddToMenu Window-Ops            "Window Ops"            Title
+                               "Move"                  Move-or-Raise2
+                               "Resize"                Resize-or-Raise2
AddToMenu Window-Ops2           "Move"                  Move-or-Raise
+                               "Resize"                Resize-or-Raise
AddToFunc Move-or-Raise         "I" Raise
+                               "M" Move
+                               "D" Lower
AddToFunc Move-or-Raise2        "M" Raise
+                               "M" Move
+                               "D" Lower
AddToFunc Resize-or-Raise       "I" Raise
+                               "M" Resize
+                               "D" Lower
AddToFunc Resize-or-Raise2      "M" Raise
+                               "M" Resize
+                               "D" Lower

Here's how it works (and doesn't):

* F2 and F4 do not work (well, they do raise the window if lowered)
* F3 and then selecting "Move" or "Resize" does not work at all
* Clicking on the upper left icon and selecting "Move" or "Resize"
  performs exactly as F2/F4 above
* Mouse1 in `T' or `S' works as expected
* Mouse1 in `F' works as expected
* Mouse2 in `T', `S', or `F' works as expected
* Mouse2 in `R' works only if I continue to hold down mouse button (new
  behavior)

Am I missing something in my functions to compensate for not holding the
button down (when calling them from menu or function key)?

(please don't cc: me, I'm on the list. :)

Rob++
----------------------------------------
Internet: [email-masked]                             __o
Life: [email-masked]                    _`\<,_
                                                       (_)/ (_)
The weather is here, wish you were beautiful.
--
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: Rob Windsor <[email-masked]>
Date: Tue, 17 Dec 2002 21:42:13 -0600

Ok, I've whipped out the manpages and am educated (once again) on what the
letter codes are.

Also, I've discovered that they work if I click the mouse immediately after
pressing the function key.  Therefore, it looks like something changed in
the code and all "I"s are treated like "C"s when called from a kbd event.

Can someone verify?

I'm available for code testing (24-hr turnaround, usually), just e-mail the
diff to me.

Rob++

---

From: Christian MICHON <[email-masked]>
Date: Wed, 18 Dec 2002 06:56:09 +0100 (CET)

> the code and all "I"s are treated like "C"s when called from a kbd event.

I think this is wrong.
"M" stands for motion, yes, but I think you need a click to define the
beginning of the motion.

If you want to move immediately after pressing F2, then do this:
AddToFunc Move-or-Raise I Raise
+ I Move
+ D Lower

It will work. But then your "D" doesn't work anymore. You need in fact a
triple click (1 to end the move, 2 to lower)

Try this then:
AddToFunc Move-or-Raise I Raise
+ I Move
+ C Lower

This should do what you intended initially. This is done on 2.4.13.

Hope this it helps.
Christian

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
--
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: Rob Windsor <[email-masked]>
Date: Wed, 18 Dec 2002 11:44:47 -0600

On Wed, 18 Dec 2002 06:56:09 +0100, verily did =?iso-8859-1?q?Christian=20MICHO

> "M" stands for motion, yes, but I think you need a click to define the

It didn't used to be this way ("M" requiring a click).  <insert standard
"I liked the old way better" whine here.>

> Hope this it helps.

Yeah, this does work, but I think it's a bug in the code.

I wonder what changed between 2.2.4 and 2.4.13 that changed this behavior.
The functions I'm using are *still* in assorted file in sample.fvwmrc/.

anyway, thanks for the workaround.

Rob++

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 19 Dec 2002 10:46:59 +0100

> "I liked the old way better" whine here.>

Well, if this used to work in 2.2.x as you claim, it was a bug in
2.2.x.  Obviously, anything but "I" makes zero sense in keyboard
bindings, and relying on it to work in a certain way is relying on
unspecified behaviour.

> > AddToFunc Move-or-Raise I Raise

Key bindings should not use the mouse related bits "M", "D", "H"
and "C".  Use this instead:

  Key f2 A N Move

> > AddToFunc Move-or-Raise I Raise

  AddToFunc Raise-and-Move-kb
  + I Raise
  + I Move

  Key f2 A N Raise-and-Move-kb

> The functions I'm using are *still* in assorted file in sample.fvwmrc/.

The functions are not intended to be used for key bindings.

Bye

Dominik ^_^  ^_^

---

From: Rob Windsor <[email-masked]>
Date: Thu, 19 Dec 2002 06:57:28 -0600

On Thu, 19 Dec 2002 10:46:59 +0100, verily did Dominik Vogt write:

>>> I think this is wrong.
>>> "M" stands for motion, yes, but I think you need a click to define
>>> the beginning of the motion.

>> It didn't used to be this way ("M" requiring a click).  <insert
>> standard "I liked the old way better" whine here.>

> bindings, and relying on it to work in a certain way is relying on

It's been working like this since 1.22.

Rob++

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 19 Dec 2002 14:11:06 +0100

> It's been working like this since 1.22.

By accident, not by design.  I won't give in to the reasoning
"It was broken for years, so it must not be fixed."

Bye

Dominik ^_^  ^_^

---

From: Rob Windsor <[email-masked]>
Date: Thu, 19 Dec 2002 15:05:40 -0600

> "It was broken for years, so it must not be fixed."

eh.  Nah, just pointing out that this is the first major rewrite I've had
to do to my .fvwm{,2}rc file since converting them from v1 to v2.

Yes, I see your point, I'll fix my crap.  It looks like the change you gave
will not upset the behavior on the systems running older versions, so I'm
cool with that.

Peace, Love, Beer.

Rob++