! 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 !
Delay when right click popup menu open lag
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description Stefan de Konink 2011-01-24 01:46:04 CET
After upgrading XFCE to version 4.8, I have noticed on all my platforms. x86 and amd64 that the right click menu takes approximately 1.5second to open after a click. It takes even longer after starting, and seems to be quicker on system with less items in the menu than systems with many items.

From my experience with 4.6 I have never noticed this lag.

What would be a good way to 'benchmark' this behavior, is it known?
Comment 1 Guido Berhoerster 2011-03-14 20:13:07 CET
I also have an openSUSE user who experiences delays up to five seconds when right clicking on the desktop root window. This happens with xfdesktop 4.8.1 and reportedly even with a fresh user account. I cannot reproduce it myself,  original report is at https://bugzilla.novell.com/show_bug.cgi?id=669768.
Comment 2 Sebastian 2011-04-29 23:28:22 CEST
I am experiencing the same behaviour on Arch Linux (64 bit) with xfdesktop 4.8.2.

The first opening of the menu definately takes a "long" time (~5s). After that it opens quicker (not as quick as I would it like to; about 1-2s delay). If i don't use the menu for some time the long delay returns.

If there is anything I can do to help analyze this bug please feel free to contact me.
Comment 3 Jannis Pohlmann editbugs 2011-04-30 02:35:57 CEST
Yes, I know, I'm experiencing the problem myself and it's annoying. We will hopefully find time to look into it soon-ish.
Comment 4 Miro Hrončok 2011-11-01 02:13:59 CET
I can see, that you know about this, just two hints:
I can report it in Fedora 64bit as well as on Debian 32bit
When the menu finally opens and I close it and open it imediately again, there is no lag.

Is there anything, that users can do to help you with this? Some tests, logs... etc?
Comment 5 Eric Koegel editbugs 2011-12-05 13:07:10 CET
Created attachment 4004 
[PATCH] Added a check for GDK_GRAB_INVALID_TIME in  xfdesktop_popup_grab_available to mitigate slow menu popups  on a right mouse click.

Based on observations, gdk_pointer_grab usually fails with a GDK_GRAB_INVALID_TIME message which means "the resource was grabbed more recently than the specified time." Currently, xfdesktop_popup_grab_available will continue to loop 2500 times to attempt to grab the mouse and keyboard. This patch adds a check for that condition to break out early since that particular mouse event will never succeed.
Additionally, I've changed how xfce_desktop_do_menu_popup operates so that it will check if it can grab the mouse/keyboard before it generates a menu, that way it won't generate a bunch of menus that won't get used while getting to the current event.
This bug is related to bug 441, https://bugzilla.xfce.org/show_bug.cgi?id=441
The keyboard event that bug is waiting on is GDK_GRAB_ALREADY_GRABBED and the loop/delay of 2500 does fix that issue.
Since I'm not an XFCE developer, please test this out and provide feedback!
Comment 6 Nick Schermer editbugs 2012-01-18 16:04:56 CET
The panel has a function for this too, could be interesting.

git.xfce.org/xfce/xfce4-panel/tree/common/panel-utils.c#n123

Bug #7172

Reported by:
Stefan de Konink
Reported on: 2011-01-24
Last modified on: 2012-03-09

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
6 users

Version

Attachments

Additional information