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?
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.
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.
Yes, I know, I'm experiencing the problem myself and it's annoying. We will hopefully find time to look into it soon-ish.
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?
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!
The panel has a function for this too, could be interesting. git.xfce.org/xfce/xfce4-panel/tree/common/panel-utils.c#n123
Committed to Master: http://git.xfce.org/xfce/xfdesktop/commit/?id=803ea66061417317df2b2968a81a4cfdfd052e8d