forked from AuroraMiddleware/gtk
recentchoooser: Update to using GdkEvent API
This commit is contained in:
parent
c0b77a2941
commit
e41844f751
@ -1698,15 +1698,16 @@ recent_view_button_press_cb (GtkWidget *widget,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GtkRecentChooserDefault *impl = GTK_RECENT_CHOOSER_DEFAULT (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;
|
GtkTreePath *path;
|
||||||
gboolean res;
|
gboolean res;
|
||||||
|
|
||||||
res = gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (impl->priv->recent_view),
|
res = gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (impl->priv->recent_view),
|
||||||
event->x, event->y,
|
x, y, &path,
|
||||||
&path,
|
|
||||||
NULL, NULL, NULL);
|
NULL, NULL, NULL);
|
||||||
if (!res)
|
if (!res)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Loading…
Reference in New Issue
Block a user