! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Submenu items launch on button press
Status:
RESOLVED: FIXED
Product:
Xfce4-panel
Component:
Launcher

Comments

Description Stefan Stuhr 2010-06-01 01:05:38 CEST
I am using the git master panel (revision 6c2ef12).

The items in launcher submenus launch on menu item button press. To reproduce why this is a problem:
1. Open the launcher submenu by moving the cursor to the launcher arrow button and press mouse button 1.
2. Without releasing mouse button 1, move to the submenu item you want to launch.
3. Release mouse button 1.

Actual Results:  
The item does not launch.

Expected Results:
The item should launch.

Ideally, the menu items should launch on menu item "activate" signal. That way, one can also use the keyboard to launch items.
Comment 1 Stefan Stuhr 2010-06-01 01:12:44 CEST
Created attachment 3004 
Proposed patch

The attached patch connects to the menu item "activate" signal instead of the "button-press-event" signal.
It uses gtk_get_current_event () in order to still support middle click launch with clipboard text.
Comment 2 Nick Schermer editbugs 2010-06-01 16:09:50 CEST
Thanks for the patch, committed in 320b58d.
Comment 3 Stefan Stuhr 2010-06-01 16:31:47 CEST
From commit:
> + event_time = event != NULL ? gdk_event_get_time (event) : GDK_CURRENT_TIME;

The above seems a bit redundant to me; gdk_event_get_time should return GDK_CURRENT_TIME anyway if event is NULL.

guint32 gdk_event_get_time (const GdkEvent *event);
    Returns the time stamp from event, if there is one; otherwise returns
    GDK_CURRENT_TIME. If event is NULL, returns GDK_CURRENT_TIME.

http://library.gnome.org/devel/gdk/stable/gdk-Events.html#gdk-event-get-time
Comment 4 Nick Schermer editbugs 2010-06-01 16:45:41 CEST
Yeah your right, I assumed it did not accept NULL, fix in git.

Bug #6485

Reported by:
Stefan Stuhr
Reported on: 2010-06-01
Last modified on: 2010-06-01

People

Assignee:
Nick Schermer
CC List:
0 users

Version

Version:
4.7 (master)

Attachments

Proposed patch (3.79 KB, patch)
2010-06-01 01:12 CEST , Stefan Stuhr
no flags

Additional information