Revert "menu: Simplify popup_at_rect"

This reverts commit a29306cb1e.
This commit is contained in:
Timm Bäder 2018-01-30 10:18:54 +01:00
parent c8a936cdcc
commit 972c0fa998

View File

@ -1924,6 +1924,7 @@ gtk_menu_popup_at_rect (GtkMenu *menu,
const GdkEvent *trigger_event) const GdkEvent *trigger_event)
{ {
GtkMenuPrivate *priv; GtkMenuPrivate *priv;
GdkEvent *current_event = NULL;
GdkDevice *device = NULL; GdkDevice *device = NULL;
guint button = 0; guint button = 0;
guint32 activate_time = GDK_CURRENT_TIME; guint32 activate_time = GDK_CURRENT_TIME;
@ -1941,7 +1942,8 @@ gtk_menu_popup_at_rect (GtkMenu *menu,
if (!trigger_event) if (!trigger_event)
{ {
trigger_event = gtk_get_current_event (); current_event = gtk_get_current_event ();
trigger_event = current_event;
} }
if (trigger_event) if (trigger_event)
@ -1962,6 +1964,8 @@ gtk_menu_popup_at_rect (GtkMenu *menu,
NULL, NULL,
button, button,
activate_time); activate_time);
g_clear_object (&current_event);
} }
/** /**