Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Problems at use | Problèmes à l'utilisation Hotkeys for global menu applet and application menu applet doesn't work.
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Problems at use | Problèmes à l'utilisation

Subjects Author Language Messages Last message
[Locked] Hotkeys for global menu applet and application menu applet doesn't work. [Bug #321]
Vorron English 12 matttbe [Read]
24 August 2013 à 23:47

Vorron, Saturday 15 June 2013 à 18:41


Subscription date : 31 May 2013
Messages : 20
Hotkeys for global menu applet and application menu applet still doesn't work.

Cairo-dock 3.2.99.alpha2
Ubuntu 13.04

matttbe, Saturday 15 June 2013 à 19:19


Subscription date : 24 January 2009
Messages : 12573
Hello and thank you for this bug report,

Yes, I confirm this bug which is due to some changes in GTKMenu. It needs some "consequent" changes in the core...

I'll add a task!

matttbe, Monday 17 June 2013 à 15:18


Subscription date : 24 January 2009
Messages : 12573
fabounet :
these shortkeys are maybe used by another application
you can see that by launching the dock in a terminal (close the running one first)

No

I also have this bug with all shortcuts which try to popup a GtkMenu...

According to the documentation, gtk_menu_popup should be used with the timestamp of the event (when pressing the hotkey) and with the button = 0.

I implement that but it's still not working...


Any idea?

PS: I confirm that the problem is not due to a wrong shortkey because with a short delay (min 200ms), I don't have any problem to open a menu from a shortkey.

=== modified file 'src/gldit/cairo-dock-container.c'
--- src/gldit/cairo-dock-container.c    2013-06-04 22:58:28 +0000
+++ src/gldit/cairo-dock-container.c    2013-06-17 13:13:48 +0000
@@ -371,+371,28 @@
             *
y0 pIcon->fHeight pIcon->fScale;
     }
 }
+
+static 
gboolean _popup_menu (gpointer *data)
+{
+    
GtkMenuPositionFunc place_menu data[2];
+    
GtkWidget *menu data[3];
+    
gtk_widget_show_all (GTK_WIDGET (menu));
+    
+    
gtk_menu_popup (GTK_MENU (menu),
+        
NULL,
+        
NULL,
+        
place_menu,
+        
data,
+        
1,
+        
gtk_get_current_event_time ());
+    
gtk_widget_show_all (GTK_WIDGET (menu));
+
+    return 
FALSE;
+}
+
 
void cairo_dock_popup_menu_on_icon (GtkWidget *menuIcon *pIconGldiContainer *pContainer)
 {
-    static 
gpointer data[2];  // 1 seul menu a la fois, donc on peut la faire statique.
+    static gpointer data[4];  // 1 seul menu a la fois, donc on peut la faire statique.
     
     
if (menu == NULL)
         return;
@@ -
383,20 +402,14 @@
         
place_menu = (GtkMenuPositionFunc)_place_menu_on_icon;
         
data[0] = pIcon;
         
data[1] = pContainer;
+        
data[2] = place_menu;
     }
+    
data[3] = menu;
     
     if (
pContainer->iface.setup_menu)
         
pContainer->iface.setup_menu (pContainerpIconmenu);
-    
-    
gtk_widget_show_all (GTK_WIDGET (menu));
-    
-    
gtk_menu_popup (GTK_MENU (menu),
-        
NULL,
-        
NULL,
-        
place_menu,
-        
data,
-        
1,
-        
gtk_get_current_event_time ());
+
+    
g_timeout_add (200, (GSourceFunc_popup_menudata);
 }
 
 

fabounet, Friday 21 June 2013 à 16:06


Subscription date : 30 November 2007
Messages : 17118
so it goes until the gtk_menu_popup, but the menu doesn't pop up ?
does it happen with another WM ? what if you set 0 instead of gtk_get_current_event_time() ? and 0 instead of 1 ?

matttbe, Friday 21 June 2013 à 20:52


Subscription date : 24 January 2009
Messages : 12573
so it goes until the gtk_menu_popup, but the menu doesn't pop up ?
Yes

does it happen with another WM ?
I also have this bug with Mutter.

what if you set 0 instead of gtk_get_current_event_time() ?
No difference. (but it still works when clicking on the icon)

and 0 instead of 1 ?
For the button? No difference except that I have to maintain the right click button when navigating into these menus

@fabounet: do you have this bug? What's your version of GTK?

Vorron, Wednesday 26 June 2013 à 13:23


Subscription date : 31 May 2013
Messages : 20
After last update application menu hotkey fixed, but global menu hotkey still doesn't work.

Vorron, Saturday 20 July 2013 à 14:50


Subscription date : 31 May 2013
Messages : 20
By the way, global menu hotkey still doesn't work

fabounet, Friday 09 August 2013 à 16:29


Subscription date : 30 November 2007
Messages : 17118
strange, they both use the same method
does it work on clicking on the icon ? isn't the shortkey used by another program ?

Vorron, Friday 09 August 2013 à 20:33


Subscription date : 31 May 2013
Messages : 20
fabounet :
does it work on clicking on the icon ? isn't the shortkey used by another program ?


Yes, clicking on icon works ok. Another programms definitely not used this key, and I was trying change hotkey as well.

Also, if press key when application without menu active, then message "The application didn't sent its menu to us" pops up. But with normal application nothing happens.

Vorron, Thursday 15 August 2013 à 17:48


Subscription date : 31 May 2013
Messages : 20
It seems the cause of trouble was found. Problem with hotkey is only while option "Pop up the menu at mouse position" enabled. All works fine when it unchecked. My bad I have not noticed this before, but it's probably something wrong with this option.

matttbe, Saturday 17 August 2013 à 00:43


Subscription date : 24 January 2009
Messages : 12573
Thank you for this detail!

@fabounet: any idea about this bug?

Guest, Saturday 24 August 2013 à 21:59

Vorron :
It seems the cause of trouble was found. Problem with hotkey is only while option "Pop up the menu at mouse position" enabled. All works fine when it unchecked. My bad I have not noticed this before, but it's probably something wrong with this option.


Uhm... where do I find that option, so I can disable it?

I've looked through the menus in cairo, and I just can't find it.

matttbe, Saturday 24 August 2013 à 23:47


Subscription date : 24 January 2009
Messages : 12573
Right click on Global Menu applet / Global Menu / Edit / Configuration / Third option

(PS: there is a 'filter' in the advanced mode of the config panel )

Problems at use | Problèmes à l'utilisation

Subjects Author Language Messages Last message
[Locked] Hotkeys for global menu applet and application menu applet doesn't work. [Bug #321]
Vorron English 12 matttbe [Read]
24 August 2013 à 23:47


Glx-Dock / Cairo-Dock List of forums Problems at use | Problèmes à l'utilisation Hotkeys for global menu applet and application menu applet doesn't work. Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.