[gtk/fix-cursor-hiding: 6/7] surface: Mark synthetic motion events as such




commit 7aed044cb6f8ec2f1f028cdafd8691c47056d582
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Mar 25 15:24:47 2021 -0400

    surface: Mark synthetic motion events as such
    
    This will let us discriminate them from actual
    device movement when necessary.

 gdk/gdksurface.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 6ad438093a..bd6ba6ff3d 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -2455,13 +2455,13 @@ gdk_surface_ensure_motion (GdkSurface *surface)
   if (!gdk_surface_get_device_position (surface, device, &x, &y, &state))
     return;
 
-  event = gdk_motion_event_new (surface,
-                                device,
-                                NULL,
-                                GDK_CURRENT_TIME,
-                                state,
-                                x, y,
-                                NULL);
+  event = gdk_synthetic_motion_event_new (surface,
+                                          device,
+                                          NULL,
+                                          GDK_CURRENT_TIME,
+                                          state,
+                                          x, y,
+                                          NULL);
 
   gdk_surface_handle_event (event);
   gdk_event_unref (event);


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