[mutter/wip/carlosg/frames-client: 13/13] tests: Wait for windows bein mapped after show
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/frames-client: 13/13] tests: Wait for windows bein mapped after show
- Date: Sat, 17 Sep 2022 12:10:22 +0000 (UTC)
commit 63f7eb7c57ecec5c2ac94284fce4d2ebac2d066e
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Sep 17 14:08:40 2022 +0200
tests: Wait for windows bein mapped after show
Since having a window shown is now a more asynchronous process,
we should wait for the window actor being mapped after requesting
the window to be shown.
src/tests/stage-view-tests.c | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/src/tests/stage-view-tests.c b/src/tests/stage-view-tests.c
index 9007a6abdd..6ccd17ef78 100644
--- a/src/tests/stage-view-tests.c
+++ b/src/tests/stage-view-tests.c
@@ -116,6 +116,14 @@ wait_for_paint (ClutterActor *stage)
g_signal_handler_disconnect (stage, was_painted_id);
}
+static void
+wait_for_window_map (ClutterActor *stage,
+ ClutterActor *window_actor)
+{
+ while (!clutter_actor_is_mapped (window_actor))
+ wait_for_paint (stage);
+}
+
static void
on_stage_views_changed (ClutterActor *actor,
gboolean *stage_views_changed)
@@ -1175,6 +1183,7 @@ meta_test_actor_stage_views_queue_frame_drawn (void)
if (!test_window)
g_error ("Failed to find the window: %s", error->message);
window_actor = CLUTTER_ACTOR (meta_window_actor_from_window (test_window));
+ wait_for_window_map (stage, window_actor);
g_assert_nonnull (clutter_actor_peek_stage_views (window_actor));
/* Queue an X11 _NET_WM_FRAME_DRAWN event; this will find the frame clock via
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]