[gtksourceview/gtksourceview-5-4] hover: ignore synthesized motion



commit 544ff4c9bd6a84ef7629fd4fb648cd0d65faf714
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]