[nautilus/wip/antoniof/gtk4-preparation-step-event-controllers: 19/21] view-icon-controller: Don’t use event in long press callback
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/gtk4-preparation-step-event-controllers: 19/21] view-icon-controller: Don’t use event in long press callback
- Date: Thu, 12 Aug 2021 17:16:58 +0000 (UTC)
commit 390ba9644b5f66600606661eed9cb56df7edfe02
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 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]