Subject: Notification: incoming/115

From: [email-masked]
Date: Wed, 6 Jan 1999 17:20:23 -0600 (CST)

FVWM Bug Tracking notification

new message incoming/115

Message summary for PR#115
	From: [email-masked]
	Subject: Menu Doesn't always catch buttonpress event
	Date: Wed, 6 Jan 1999 17:20:21 -0600 (CST)
	0 replies 	0 followups

====> ORIGINAL MESSAGE FOLLOWS <====

---

From: Kent Howard <[email-masked]>
Date: Wed, 6 Jan 1999 20:53:14 -0800

On Wed, Jan 06, 1999 at 05:20:23PM -0600, [email-masked] wrote:
+----------
| Full_Name: David Ronis
| Version: 2.1.5
| CVS_Date: 
| OS: Linux 2.2.0-pre4/2.0.36
| X_Server: XFree86 Version 3.3.3
| Submission from: (NULL) (132.206.20.6)
| 
| The main utilities menu (the relevant part of my .fvwm2rc file is
| pasted below) sometimes misses ButtonPress events (especially
| when the system is more loaded).  This happens on both an i486
| and an i586.
| 
| The problem only seems to happen with the 1st entry (xterm) in
| the menu listed below although, it's probably the most heavily
| used one.  
| 
| If I move the mouse cursor on the menu, and then click on
| Xterm--it always seems to work.
| 
| Two possibilities:
| 
| a)  Events are really being dropped.
| b)  There is some error in the calculation of where the event is really
|     happening (probably saying that I've clicked on the menu title).
+----------

I think this is that menu delay that I reported a while back.
Dominik said something about it being there to prevent accidental
selection of menu items.

Where is the code for that Dominik?

Thanks,
- Kent
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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: Dominik Vogt <[email-masked]>
Date: Thu, 7 Jan 1999 09:45:57 +0100

> Where is the code for that Dominik?

Wow, good question. I think it's been imbedded in the event
handling section of menuInteraction and perhaps the shortcut
function (both menus.c). I don't think you can find it until
you are *very* comfortable with the source. Try starting
with asking me questions. What exactly are you looking for/
trying to do? I think I can answers specific questions from
the code.

Bye

Dominik
-- 
Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/14-4596, fax: 07031/14-3883, [email-masked]
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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: Dominik Vogt <[email-masked]>
Date: Thu, 7 Jan 1999 14:31:43 +0100

> The main utilities menu (the relevant part of my .fvwm2rc file is pasted
> below)
> sometimes misses ButtonPress events (especially when the system is more
> loaded).
> This happens on both an i486 and an i586.
>
> The problem only seems to happen with the 1st entry (xterm) in the menu
> listed below
> although, it's probably the most heavily used one.
>
> If I move the mouse cursor on the menu, and then click on Xterm--it always
> seems to
> work.
>
> Two possibilities:
>
> a)  Events are really being dropped.
> b)  There is some error in the calculation of where the event is really
> happening
>      (probably saying that I've clicked on the menu title).

Actually it's (c). No error happening, no events being dropped,
not a bug. You are using the 'Popup' command to open the root menu.
Menu items won't be invoked it the pointer starts on a menu item
and you release the pointer fast. In the latest code there's some
option to tune this delay (duble click time or so, see MenuStyle).
If you absolutely need this action always you can bind a default
action to your Popup menu:

  Popup Utilities Exec xterm

Bye

Dominik

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 7 Jan 1999 14:57:03 +0100

> Where is the code for that Dominik?

Oops, my last reply was a wide shot. The responsible code is
in de_menu:

  if (lastTimestamp-t0 < Scr.menus.DoubleClickTime && !mouse_moved &&           
      (!key_press || dkp_timestamp != 0)) {                                     
    /* dkp_timestamp is non-zero if a double-keypress occured! */               
    fDoubleClick = TRUE;                                                        
  }                                                                             

This works for Popup menus too. In case of a double click the
actual action on the menu item is ignored. Instead the default
action is executed.

Bye

Dominik