! 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 !
Application menu is a submenu of an "Applications" popup when right clicking ...
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description Skunnyk editbugs 2017-09-17 18:29:39 CEST
With xfdesktop 4.13.1, when I right click on the desktop without icons ("Icon type: None" in xfdesktop-settings preferences), the applications menu list is a submenu of an "Applications" popup.

See this screenshot: https://i.imgur.com/o0skApA.png

In previous versions, the Application Menu is not in a submenu.

I think the bug has been introduced by the migration to garcon : https://git.xfce.org/xfce/xfdesktop/commit/?id=171025ea3 ( no more "check to see if the menu is empty.  if not, add the desktop to a submenu" condition in src/menu.c )

Also, the menu is displayed only once in two (I need to right click twice on the desktop), but maybe it's another problem.
Comment 1 MB 2017-10-19 18:38:52 CEST
The same thing here.
Eric, is it possible to fix that?
Many thanks in advance.

regards
Comment 2 Skunnyk editbugs 2017-12-03 14:17:48 CET
Created attachment 7463 
Fix "applications" submenu
Comment 3 Skunnyk editbugs 2017-12-03 14:18:36 CET
Please review/test ! :)

I still have the bug where menu is displayed only once in two (I need to right click twice on the desktop), the event is not propagated correctly, I'll open another bug.
Comment 4 Skunnyk editbugs 2017-12-03 19:49:37 CET
Created attachment 7464 
Fix "applications" submenu

Better support of "applications icons" option
Comment 5 Git Bot editbugs 2017-12-05 08:40:55 CET
Romain B referenced this bugreport in commit eb881f8235cec689e0a017b1d890aa7a53c9dfa8

Do not popup a single "Applications" menu when right clicking on desktop

https://git.xfce.org/xfce/xfdesktop/commit?id=eb881f8235cec689e0a017b1d890aa7a53c9dfa8
Comment 6 Eric Koegel editbugs 2017-12-05 08:44:39 CET
Thanks!
Comment 7 MB 2017-12-12 18:34:51 CET
(In reply to Eric Koegel from comment #6)
> Thanks!

Dear Maintainer,

I've compiled the xfdesktop-master with the patch from Romain, but now, the function xfdesktop -M does not work anymore.
If start this from terminal, I get no error messages. The funktion is dead.
xfdesktop -W works fine.

I compiled with --prefix=/usr --disable-debug --disable-desktop-icons, make and checkinstall, all of this steps are ok.
So, than I install the debian package with dpkg -i, also it's ok.
Then, after reboot, by rightclick on desktop, the applicationsmenu has no submenu, only my toplevel applications. Super!
This is by first rightclicking.
With all further attempts are again two clicks necessary.
I think the error is not completely resolved yet.

My system is Debian Sid with kernel 4.14 and xfdesktop 4.13.1

Best regards
MB
Comment 8 Skunnyk editbugs 2017-12-12 23:40:02 CET
@MB : 

I tried your scenario, and with git-master, xfdesktop -M / -W works correctly.
Are you sure you stopped old xfdesktop instance before running the one from git ? (with xfdesktop -Q)

About the "double click" problem, I noticed that too and this is another bug ( the event click is not propagated correctly), I need to open another bug for that :)
Comment 9 MB 2017-12-14 13:28:36 CET
Hello @Skunnyk,
yes, I reboot the system always after the change.
Sorry for my first bad explanation, I try to explain it more exactly.

Scenario with your patch, compiled from xfdesktop-master:

The commands xfdesktop -W and xfdesktop -M are on a keyboard-shortcut.
xfdesktop -W is on SuperL and xfdesktop -M is on alt+SuperL.
The windowlist (xfdesktop -W) on shortcut works fine, the menulist (xfdesktop -M)  has no reaction.
If I start both commands on the terminal, it works ok.

Scenario without your patch, compiled from git 4.13.1:

Start from terminal works fine.
Start with keyboard, both shortcuts works fine, although with the submenu, but that's so far ok.

regards
MB
Comment 10 Skunnyk editbugs 2017-12-15 00:02:29 CET
Ok, thank you, I can reproduce, I reopen the bug.

If you keep the shortcut pressed, the menu popup… so much mystery :)

It's seems that "desktop_menu" variable is not correct (?), I have this warning inside menu_populate when it runs the gtk_menu_popup (my code with custom debug): 

DBG[xfce-desktop.c:1743] xfce_desktop_do_menu_popup(): entering here
DBG[menu.c:63] menu_populate(): ENTERING
DBG[menu.c:72] menu_populate(): show desktop menu icons TRUE
DBG[menu.c:74] menu_populate(): here
DBG[menu.c:102] menu_populate(): no submenu

(xfdesktop:25847): GLib-GObject-CRITICAL **: g_object_set_data: assertion 'G_IS_OBJECT (object)' failed
DBG[menu.c:105] menu_populate(): no submenu2
DBG[xfce-desktop.c:1746] xfce_desktop_do_menu_popup(): entering4


But only when running through a shortcut ! With xfdesktop -M from CLI, it works fine without any CRITICAL.
Comment 11 Skunnyk editbugs 2017-12-15 00:12:13 CET
Ok, by remplacing gtk_menu_popup by xfce_gtk_menu_popup_until_mapped, it works : "this function will verify that the menu has been mapped or will keep trying for up to 250ms. " This simulate a long press ? 

I need to validate that with other xfce dev, then I'll attach a patch :)
Comment 12 Skunnyk editbugs 2017-12-15 00:14:08 CET
Ok, by reading the libxfce4ui 4.13 changelog:

xfce_gtk_menu_popup_until_mapped:  Add xfce_gtk_menu_popup_until_mapped as a convenience function to fix widespread problems with popping up menus (e.g. on keyboard shortcuts)

Bingo !
Comment 13 MB 2017-12-16 15:54:08 CET
Hi @Skunnyk

I've testing libxfce4ui and that is the situation at the moment:
after a reboot, I can right-click on the desktop to call the menu. so far OK.
If I press the shortcut briefly, nothing happens.
If I press the shortcut for about 5 seconds, then the menu will appear, but it will always be visible, even if I select a menu item.
If I press the shortcut a second time, a second menu appears and also remains visible next to the first menu.
Very mysterious...

regards
MB
Comment 14 Skunnyk editbugs 2017-12-16 18:51:34 CET
Created attachment 7496 
Use xfce_gtk_menu_popup_until_mapped to popup the menu

Please test with this patch to xfdesktop :)
Comment 15 MB 2017-12-16 19:14:24 CET
Sorry, I don't know, with which command I can insert a patch directly.
Can you briefly write that to me?
Thanks 
MB
Comment 16 Skunnyk editbugs 2017-12-16 19:25:03 CET
Get the patch in the xfdesktop git folder,  patch -p1 < attachment.cgi?id=7496  , then  run make
Comment 17 MB 2017-12-16 19:46:07 CET
Perfect!
Many many thanks for your work!

kind regards
MB
Comment 18 Git Bot editbugs 2018-02-27 22:19:46 CET
Romain B referenced this bugreport in commit 97a9e45e478d16f5b91f3f6e294b7977b65f29bb

Use xfce_gtk_menu_popup_until_mapped to popup the menu

https://git.xfce.org/xfce/xfdesktop/commit?id=97a9e45e478d16f5b91f3f6e294b7977b65f29bb

Bug #13866

Reported by:
Skunnyk
Reported on: 2017-09-17
Last modified on: 2018-06-09

People

Assignee:
Eric Koegel
CC List:
2 users

Version

Version:
4.13.1

Attachments

Additional information