From 662c76c4fc3275bb1e49503f19422860c7bacd97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 1 Nov 2019 13:48:50 +0100 Subject: [PATCH] tests/monitor-unit-tests: Add another tiling window hot plug test Checks that we handle hot plugs of a untiled window, that was previously tiled. https://gitlab.gnome.org/GNOME/mutter/merge_requests/912 --- src/tests/monitor-unit-tests.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/tests/monitor-unit-tests.c b/src/tests/monitor-unit-tests.c index c03c17e8d..b498d899f 100644 --- a/src/tests/monitor-unit-tests.c +++ b/src/tests/monitor-unit-tests.c @@ -5857,6 +5857,29 @@ meta_test_monitor_wm_tiling (void) dispatch (); + /* + * 1) Start with two monitors connected. + * 2) Tile a window on the second monitor. + * 3) Untile window. + * 4) Unplug monitor. + * 5) Tile window again. + */ + + test_case.setup.n_outputs = 2; + test_setup = create_monitor_test_setup (&test_case, + MONITOR_TEST_FLAG_NO_STORED); + emulate_hotplug (test_setup); + + meta_window_move_to_monitor (test_window, 1); + meta_window_tile (test_window, META_TILE_NONE); + + test_case.setup.n_outputs = 1; + test_setup = create_monitor_test_setup (&test_case, + MONITOR_TEST_FLAG_NO_STORED); + emulate_hotplug (test_setup); + + meta_window_tile (test_window, META_TILE_MAXIMIZED); + test_client_destroy (test_client); }