[nautilus/wip/antoniof/flow-box-preparation: 18/29] view-icon-controller: Don’t use event in long press callback




commit 901ee3410bf122a827971eb0839236629d943d35
Author: Ernestas Kulik <ernestask gnome org>
Date:   Fri Jul 13 13:35:32 2018 +0300

    view-icon-controller: Don’t use event in long press callback
    
    The coordinates in parameters are perfectly fine.

 src/nautilus-view-icon-controller.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/nautilus-view-icon-controller.c b/src/nautilus-view-icon-controller.c
index 677db77cc..a51f4e4f9 100644
--- a/src/nautilus-view-icon-controller.c
+++ b/src/nautilus-view-icon-controller.c
@@ -754,7 +754,6 @@ on_longpress_gesture_pressed_callback (GtkGestureLongPress *gesture,
     NautilusViewIconController *self;
     g_autoptr (GList) selection = NULL;
     GtkWidget *child_at_pos;
-    GdkEventButton *event_button;
     GdkEventSequence *event_sequence;
     GdkEvent *event;
 
@@ -762,12 +761,11 @@ on_longpress_gesture_pressed_callback (GtkGestureLongPress *gesture,
     event = (GdkEvent *) gtk_gesture_get_last_event (GTK_GESTURE (gesture), event_sequence);
 
     self = NAUTILUS_VIEW_ICON_CONTROLLER (user_data);
-    event_button = (GdkEventButton *) event;
 
     /* Need to update the selection so the popup has the right actions enabled */
     selection = nautilus_view_get_selection (NAUTILUS_VIEW (self));
     child_at_pos = GTK_WIDGET (gtk_flow_box_get_child_at_pos (self->view_ui,
-                                                              event_button->x, event_button->y));
+                                                              x, y));
     if (child_at_pos != NULL)
     {
         NautilusFile *selected_file;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]