mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 09:00:42 -05:00
tests/stage-view: Keep old stage views alive on hotplug
Otherwise we cannot reliably compare them to the new post-hotplug views. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1357
This commit is contained in:
parent
03d177cf64
commit
65aa476414
@ -561,11 +561,13 @@ meta_test_actor_stage_views_hot_plug (void)
|
||||
is_on_stage_views (actor_1, 1, stage_views->data);
|
||||
is_on_stage_views (actor_2, 1, stage_views->next->data);
|
||||
|
||||
prev_stage_views = g_list_copy_deep (stage_views,
|
||||
(GCopyFunc) g_object_ref, NULL);
|
||||
|
||||
test_setup = create_monitor_test_setup (&hotplug_test_case_setup,
|
||||
MONITOR_TEST_FLAG_NO_STORED);
|
||||
meta_monitor_manager_test_emulate_hotplug (monitor_manager_test, test_setup);
|
||||
|
||||
prev_stage_views = stage_views;
|
||||
stage_views = clutter_stage_peek_stage_views (CLUTTER_STAGE (stage));
|
||||
|
||||
g_assert (stage_views != prev_stage_views);
|
||||
@ -575,6 +577,8 @@ meta_test_actor_stage_views_hot_plug (void)
|
||||
assert_is_stage_view (stage_views->data, 0, 0, 1024, 768);
|
||||
assert_is_stage_view (stage_views->next->data, 1024, 0, 1024, 768);
|
||||
|
||||
g_list_free_full (prev_stage_views, (GDestroyNotify) g_object_unref);
|
||||
|
||||
is_on_stage_views (actor_1, 0);
|
||||
is_on_stage_views (actor_2, 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user