Running xfdesktop from git on Arch Linux. With desktop icons disabled, I have to right-click twice on desktop to bring up menu. The first click (or every other click) is ignored. With icons enabled, all works fine. With debug enabled, the first click does not create a debug entry. The second click, the one that works, generates: DBG[menu.c:72] menu_populate(): show desktop menu icons TRUE Adding further debug code shows that the ignored click doesn't enter the menu_populate function. I will keep digging further to see if I can find the cause.
Problem is in xfce-desktop.c line 1209 to 1215. On processed event, gtk_widget doesn't have grab, so it's grabbed and the menu popped up. On the subsequent run, gtk_widget does have grab so the root menu is no popped up.
Created attachment 7738 Fix root menu popup issue with desktop icons disabled Looks like it was a blocking issue. Attached patch fixes it.
Works for me. Just git apply complained about a trailing whitespace.
Created attachment 7739 Patch Odd. I usually use "patch -p1" to patch the code, and it doesn't issue a warning, but "git apply" does. Anyways, the attached version of the patch should work for both methods. No more warnings.
I though I had fixed this issue in https://bugzilla.xfce.org/show_bug.cgi?id=13866 / https://git.xfce.org/xfce/xfdesktop/commit/?id=97a9e45e478d16f5b91f3f6e294b7977b65f29bb . Or is it another bug ? (I does not run xfdesktop git right now)
@skunnyk, that commit didn't fix this particular issue for me (I've noticed it for a while now but just got around to creating a bug report). The code basically said, if the widget (desktop) isn't grabbed, then grab it __and__ popup the menu. However, it appeared that on the subsequent right-click, the widget was grabbed - in which case the menu was not popped up. Strange though that on the next right-click the widget was again not grabbed. It looks like your commit is somewhat related though...
@ToZ Many thanks for your patch, it works fine on Debian Sid with Xfce-Gtk3. best regards
ToZ referenced this bugreport in commit b94027ad3c0e74cebdd28c586d0d361a7d8ecb97 Fix menu popup issue with desktop icons disabled (Bug #14415) https://git.xfce.org/xfce/xfdesktop/commit?id=b94027ad3c0e74cebdd28c586d0d361a7d8ecb97
Pushed to master, thanks! Basically it undoes this: https://git.xfce.org/xfce/xfdesktop/commit/?id=58c9309e5364e2b06d94def4324c2ed7d2b455d5 Which seems to be properly fixed by this: https://git.xfce.org/xfce/xfdesktop/commit/?id=47bfaecdfd5c6936d293c86ea0e68fbdadbcde5d
*** Bug 14091 has been marked as a duplicate of this bug. ***