recentchoooser: Update to using GdkEvent API

This commit is contained in:
Carlos Garnacho 2017-08-25 16:54:11 +02:00
parent c0b77a2941
commit e41844f751

View File

@ -1698,15 +1698,16 @@ recent_view_button_press_cb (GtkWidget *widget,
gpointer user_data)
{
GtkRecentChooserDefault *impl = GTK_RECENT_CHOOSER_DEFAULT (user_data);
gdouble x, y;
if (gdk_event_triggers_context_menu ((GdkEvent *) event))
if (gdk_event_triggers_context_menu ((GdkEvent *) event) &&
gdk_event_get_coords ((GdkEvent *) event, &x, &y))
{
GtkTreePath *path;
gboolean res;
res = gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (impl->priv->recent_view),
event->x, event->y,
&path,
x, y, &path,
NULL, NULL, NULL);
if (!res)
return FALSE;