[gtksourceview] hover: ignore synthesized motion



commit 897e62ce69826789613ac077ffa9de115a3117b0
Author: Christian Hergert <chergert redhat com>
Date:   Wed Apr 27 17:57:13 2022 -0700

    hover: ignore synthesized motion

 gtksourceview/gtksourcehover.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/gtksourceview/gtksourcehover.c b/gtksourceview/gtksourcehover.c
index 8b219307..6ee59ba0 100644
--- a/gtksourceview/gtksourcehover.c
+++ b/gtksourceview/gtksourcehover.c
@@ -198,6 +198,12 @@ gtk_source_hover_motion_cb (GtkSourceHover           *self,
        g_assert (GTK_SOURCE_IS_HOVER (self));
        g_assert (GTK_IS_EVENT_CONTROLLER_MOTION (controller));
 
+       /* Ignore synthesized motion events */
+       if (self->motion_x == x && self->motion_y == y)
+       {
+               return;
+       }
+
        self->motion_x = x;
        self->motion_y = y;
 


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