! 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 !
Right-click menu not activated on first attempt if no icons on screen
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description ToZ editbugs 2018-05-24 03:59:10 CEST
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.
Comment 1 ToZ editbugs 2018-05-24 04:08:41 CEST
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.
Comment 2 ToZ editbugs 2018-05-24 04:14:54 CEST
Created attachment 7738 
Fix root menu popup issue with desktop icons disabled

Looks like it was a blocking issue. Attached patch fixes it.
Comment 3 Andre Miranda editbugs 2018-05-24 04:24:12 CEST
Works for me.
Just git apply complained about a trailing whitespace.
Comment 4 ToZ editbugs 2018-05-24 04:38:09 CEST
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.
Comment 5 Skunnyk editbugs 2018-05-24 13:48:01 CEST
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)
Comment 6 ToZ editbugs 2018-05-24 15:15:53 CEST
@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...
Comment 7 bugs1 2018-05-28 19:09:04 CEST
@ToZ
 Many thanks for your patch,  it works fine on Debian Sid with Xfce-Gtk3.

best regards
Comment 8 Git Bot editbugs 2018-05-29 01:01:21 CEST
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
Comment 9 Andre Miranda editbugs 2018-05-29 01:02:33 CEST
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
Comment 10 Skunnyk editbugs 2018-09-18 19:09:39 CEST
*** Bug 14091 has been marked as a duplicate of this bug. ***

Bug #14415

Reported by:
ToZ
Reported on: 2018-05-24
Last modified on: 2018-09-18
Duplicates (1):
  • 14091 Desktop menu is displayed once in two when Icon Type pref is None

People

Assignee:
Eric Koegel
CC List:
3 users

Version

Version:
4.13.1

Attachments

Additional information