summaryrefslogtreecommitdiff
path: root/gtk/gtkgestureclick.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-02-13 00:08:49 -0500
committerMatthias Clasen <mclasen@redhat.com>2020-02-21 00:47:53 -0500
commitdd251d85c464adb95783c7224b963f9294dff588 (patch)
treefd8d303b8b276775f83204256a18f5e7bfd7b72c /gtk/gtkgestureclick.c
parentcd2b58574d492e0d597510531e7a1898741d094d (diff)
downloadgtk+-dd251d85c464adb95783c7224b963f9294dff588.tar.gz
Pass translated coordinates outside the event
We want to make events readonly, so stop translating their coordinates and instead pass the translated coordinates separately, when propagating events.
Diffstat (limited to 'gtk/gtkgestureclick.c')
-rw-r--r--gtk/gtkgestureclick.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/gtkgestureclick.c b/gtk/gtkgestureclick.c
index 8814540b18..27b64eb684 100644
--- a/gtk/gtkgestureclick.c
+++ b/gtk/gtkgestureclick.c
@@ -307,13 +307,14 @@ gtk_gesture_click_reset (GtkEventController *controller)
static gboolean
gtk_gesture_click_handle_event (GtkEventController *controller,
- const GdkEvent *event)
+ const GdkEvent *event,
+ double x,
+ double y)
{
GtkEventControllerClass *parent_controller;
GtkGestureClickPrivate *priv;
GdkEventSequence *sequence;
guint button;
- gdouble x, y;
priv = gtk_gesture_click_get_instance_private (GTK_GESTURE_CLICK (controller));
parent_controller = GTK_EVENT_CONTROLLER_CLASS (gtk_gesture_click_parent_class);
@@ -326,12 +327,11 @@ gtk_gesture_click_handle_event (GtkEventController *controller,
{
if (!gdk_event_get_button (event, &button))
button = 0;
- gdk_event_get_coords (event, &x, &y);
g_signal_emit (controller, signals[UNPAIRED_RELEASE], 0,
x, y, button, sequence);
}
- return parent_controller->handle_event (controller, event);
+ return parent_controller->handle_event (controller, event, x, y);
}
static void