Subject: FVWM: How to deactivate pressed button

From: Marcin Głogowski <[email-masked]>
Date: Sun, 12 Oct 2003 17:37:26 +0200

Hi,
I have a little problem.
When I push mouse on any of title bar buttons the buttons are executing 
a command even I move the mouse cursor behind the button and release the 
button.
How to solve this?
Thank you for the help.

--
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: Sun, 12 Oct 2003 19:21:13 +0300

> a command even I move the mouse cursor behind the button and release the 

Use a function instead of an immediate command. And in the function use
"C" to execute a command, not "I". Then it will work like you want.

You may create really interesting button feels. For example, in
fvwm-themes all dangerous operations are canceled when you drag
a button after the accident press. Or when you simply wait (hold).
Even if the cursor does not leave the button area.

Like in this small snippet:

  #     button    context modifie function
  Mouse 0         2       A       FuncFvwmDeleteOrDestroy
  Mouse 1         4       A       FuncFvwmMaximize
  Mouse 1         6       A       FuncFvwmIconify
  
  DestroyFunc FuncFvwmDeleteOrDestroy
  AddToFunc   FuncFvwmDeleteOrDestroy
  + H Nop
  + M Nop
  + C Delete
  + D Destroy

  DestroyFunc FuncFvwmMaximize
  AddToFunc   FuncFvwmMaximize
  + M Nop
  + H Nop
  + C Maximize
  + D Menu MenuFvwmWindowMaximize

  DestroyFunc FuncFvwmIconify
  AddToFunc   FuncFvwmIconify
  + C Iconify

You need only "C" to cover your question, but having additional canceling
mechanisms (Nop on Move and Hold) may be useful too.

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 13 Oct 2003 09:24:07 +0200

> a command even I move the mouse cursor behind the button and release the 

Press the Escape key before releasing the button.

Ciao

Dominik ^_^  ^_^

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 13 Oct 2003 11:17:31 +0300

> Press the Escape key before releasing the button.

This never works when a function is bound. With either "I" or "C".

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 13 Oct 2003 11:47:57 +0200

> This never works when a function is bound. With either "I" or "C".

Nothing works if an action is bound with "I".

Ciao

Dominik ^_^  ^_^