[Xfce4-commits] <xfdesktop:xfce-4.6> only register menu with panel if popup succeeded (bug 5792)
Brian J. Tarricone
noreply at xfce.org
Mon Oct 19 09:24:01 CEST 2009
Updating branch refs/heads/xfce-4.6
to d5ee494b57a4117c3012e8dd6735ed11c74ce6f5 (commit)
from 666d693b4044c2ac20b54ebc292d5b0610636c99 (commit)
commit d5ee494b57a4117c3012e8dd6735ed11c74ce6f5
Author: Brian J. Tarricone <brian at tarricone.org>
Date: Mon Oct 19 00:23:15 2009 -0700
only register menu with panel if popup succeeded (bug 5792)
panel-plugin/desktop-menu-plugin.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/panel-plugin/desktop-menu-plugin.c b/panel-plugin/desktop-menu-plugin.c
index a993310..36fe36a 100644
--- a/panel-plugin/desktop-menu-plugin.c
+++ b/panel-plugin/desktop-menu-plugin.c
@@ -366,10 +366,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);
}
More information about the Xfce4-commits
mailing list