[mutter/wip/carlosg/unthrottled-wayland: 5/27] tests: Ensure pointer entered the stage at actor-event-hold test




commit a7fc74032e8affc1f80a3643bb9443def25ee90e
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Dec 7 19:44:26 2021 +0100

    tests: Ensure pointer entered the stage at actor-event-hold test
    
    This test is injecting input events without checking the correct stage/
    device state. Wait for the pointer to enter the stage, so the event gets
    correctly forwarded across.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1915>

 src/tests/clutter/conform/actor-event-hold.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/tests/clutter/conform/actor-event-hold.c b/src/tests/clutter/conform/actor-event-hold.c
index 2ba5251bf5..1635cf7b46 100644
--- a/src/tests/clutter/conform/actor-event-hold.c
+++ b/src/tests/clutter/conform/actor-event-hold.c
@@ -83,6 +83,9 @@ actor_event_hold (void)
   seat = clutter_backend_get_default_seat (backend);
   device = clutter_seat_get_pointer (seat);
 
+  while (clutter_stage_get_device_actor (CLUTTER_STAGE (stage), device, NULL) == NULL)
+    g_main_context_iteration (NULL, FALSE);
+
   for (n_test_case = 0; n_test_case < G_N_ELEMENTS (test_cases); n_test_case++)
     {
       graphene_point_t actual_position;


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