diff --git a/panel-plugin/desktop-menu-plugin.c b/panel-plugin/desktop-menu-plugin.c index 503cd12..80fdc4e 100644 --- a/panel-plugin/desktop-menu-plugin.c +++ b/panel-plugin/desktop-menu-plugin.c @@ -350,10 +350,11 @@ menu_activate(DMPlugin *dmp, gboolean at_pointer) G_CALLBACK(menu_deactivated), dmp); if (!at_pointer) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE); - xfce_panel_plugin_register_menu (dmp->plugin, GTK_MENU(menu)); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, (GtkMenuPositionFunc)(at_pointer ? NULL : dmp_position_menu), dmp, 1, gtk_get_current_event_time()); + if(gtk_grab_get_current() == menu) + xfce_panel_plugin_register_menu(dmp->plugin, GTK_MENU(menu)); } else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), FALSE); }