Commit 8a024319 authored by Gaël Bonithon's avatar Gaël Bonithon
Browse files

Avoid "no trigger event" warning for popup commands

parent bf10604f
......@@ -851,9 +851,10 @@ applications_menu_plugin_menu (GtkWidget *button,
if (button != NULL)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
/* Panel plugin remote events don't send actual GdkEvents, so construct a minimal one so that
* gtk_menu_popup_at_pointer/rect can extract a location correctly from a GdkWindow */
else if (event == NULL)
if (event == NULL)
{
event = g_slice_new0 (GdkEventButton);
event->type = GDK_BUTTON_PRESS;
......
......@@ -1306,7 +1306,7 @@ directory_menu_plugin_menu (GtkWidget *button,
/* Panel plugin remote events don't send actual GdkEvents, so construct a minimal one so that
* gtk_menu_popup_at_pointer/rect can extract a location correctly from a GdkWindow */
if (button == NULL)
if (gtk_get_current_event () == NULL)
{
event = g_slice_new0 (GdkEventButton);
event->type = GDK_BUTTON_PRESS;
......
......@@ -1400,7 +1400,7 @@ window_menu_plugin_menu (GtkWidget *button,
/* Panel plugin remote events don't send actual GdkEvents, so construct a minimal one so that
* gtk_menu_popup_at_pointer/rect can extract a location correctly from a GdkWindow */
if (button == NULL)
if (gtk_get_current_event () == NULL)
{
event = g_slice_new0 (GdkEventButton);
event->type = GDK_BUTTON_PRESS;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment