! 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 !
xfce4-toggle-applicationsmenu
Status:
RESOLVED: WONTFIX
Severity:
enhancement
Product:
Xfce4-panel
Component:
Applications Menu

Comments

Description Andre Miranda editbugs 2013-10-30 02:38:28 CET
Created attachment 5212 
patch

As requested here http://wiki.xfce.org/plugins_wish_list#xfce-menu
"xfce4-toggle-applicationsmenu script that could be mapped to a keyboard key to popup/hide the menu. Currently, xfce4-popup-applicationsmenu can be mapped to a key, but the menu needs to be closed using Esc key."

The attached patch only works when doing this in the terminal:
xfce4-toggle-applicationsmenu && sleep 1 && xfce4-toggle-applicationsmenu

I don't know what prevents the hotkey toggling, it only gets called once, the second call, which would hide the menu, is ignored. I guess this is something related to 'panel_utils_grab_available'.
Comment 1 Andre Miranda editbugs 2014-05-05 20:49:16 CEST
Created attachment 5473 
Patch

Patch updated.

Inspecting the problem more thoroughly, it seems the problem is not related to applicationsmenu nor xfce4-panel remote event handling.

If one runs something like "top -d 0.1 -o COMMAND" and press the hotkey which calls xfce4-toogle-applicationsmenu.sh, one will see a new process for the script spawning. If the key is pressed again, another process won't be spawned.

I guess the problem is due xfsettingsd not getting keystrokes while the appmenu is open. I think it's because gtk_menu grabs the keyboard as described in this thread: https://mail.gnome.org/archives/gtk-app-devel-list/2007-February/msg00183.html
Comment 2 Andre Miranda editbugs 2014-05-06 04:39:08 CEST
Just for the record, testing the whisker menu[1] I noticed that its xfce4-popup-whiskermenu script toggles the menu correctly...

[1] http://gottcode.org/xfce4-whiskermenu-plugin/
Comment 3 Andrzej editbugs 2014-05-15 02:15:42 CEST
Does the patch work for you? (sorry, I didn't have time to check it)

I think modifying xfce4-popup-applicationsmenu to toggle the menu (like xfce4-popup-whiskermenu does) would work better - no need for two separate scripts and extra code in the plugin.
Comment 4 Andre Miranda editbugs 2017-06-21 23:23:59 CEST
As Simon pointed me for this old bug, I agree with Andrzej, forget the patches and adopt the whiskermenu approach. Unfortunately do not expect me to handle this, as I don't use neither plugins anymore. Should we close this?
Comment 5 Simon Steinbeiss editbugs 2018-05-01 08:04:28 CEST
Yup, happy to close it for now if nobody is interested in the feature or working on it.

Bug #10451

Reported by:
Andre Miranda
Reported on: 2013-10-30
Last modified on: 2018-05-01

People

Assignee:
Nick Schermer
CC List:
2 users

Version

Version:
4.10.1

Attachments

patch (3.60 KB, patch)
2013-10-30 02:38 CET , Andre Miranda
no flags
Patch (2.24 KB, patch)
2014-05-05 20:49 CEST , Andre Miranda
no flags

Additional information