Sometimes when the file context menu is open, and you right click outside the menu, both the system and the file context menu appear, see this screenshot: http://xfce.org/~benny/tmp/xfdesktop-menu-bug.png It's nearly reproducible this way: 1) Open the system menu (right-click on desktop) 2) Right click once on a file on the desktop (system menu disappears) 3) Right click another time to open the context menu (both system and context menu will appear as shown in the screenshot) My guess is that you are missing gtk_grab_add()/gtk_grab_remove() for the menu handling.
I noticed this a couple times but I couldn't reproduce it. I'm not using grabs for the file context menu, just gtk_menu_popup(). However, the desktop menu is using some code from Olivier that continually tries to do grabs for a few seconds until it succeeds. This fixed the bug where binding 'xfdesktop -menu' to a keybinding was failing most of the time. There's probably some conflict going on. What do you suggest?
I'd suggest to use a main loop for the menu and gtk_grab_add()/gtk_grab_remove(). That should fix the problem.
Hmm, that didn't work, not sure why. Either way, I "fixed" it by eating double-clicks from the icon view so the desktop won't see them. Though I suppose the desktop shouldn't be popping up the menu on double-click anyway.