diff options
author | Ernestas Kulik <ernestask@gnome.org> | 2018-07-13 13:35:32 +0300 |
---|---|---|
committer | António Fernandes <antoniof@gnome.org> | 2021-08-16 10:36:46 +0100 |
commit | 0f551266353184973f3790cca995df16823039ec (patch) | |
tree | b1d371632afaf0248ab0acb67abbb1c054094dae | |
parent | e8c157b6c7d2953b2f8e108c8d884a40056c167c (diff) | |
download | nautilus-0f551266353184973f3790cca995df16823039ec.tar.gz |
view-icon-controller: Don’t use event in long press callback
The coordinates in parameters are perfectly fine.
-rw-r--r-- | src/nautilus-view-icon-controller.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nautilus-view-icon-controller.c b/src/nautilus-view-icon-controller.c index 5e528e032..d05e42d96 100644 --- a/src/nautilus-view-icon-controller.c +++ b/src/nautilus-view-icon-controller.c @@ -759,7 +759,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; @@ -767,12 +766,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 (GTK_FLOW_BOX (self->view_ui), - event_button->x, event_button->y)); + x, y)); if (child_at_pos != NULL) { NautilusFile *selected_file; |