tests/monitor-unit: Don't double remove test touch devices
Test touch devices are autocleaned up, but if a test case explicitly needs it to be removed at a certain point, make sure to also clear the pointer so that it doesn't get removed twice. Right now it's harmless, but in a later commit it'll expected to only remove a device once. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3812>
This commit is contained in:
parent
5fee5da3d2
commit
b94a5de39d
@ -4721,6 +4721,7 @@ meta_test_monitor_orientation_initial_stored_rotated (void)
|
||||
/* When no touch device is available, the orientation change is ignored */
|
||||
g_test_message ("Removing touch device");
|
||||
meta_backend_test_remove_device (META_BACKEND_TEST (backend), touch_device);
|
||||
g_clear_object (&touch_device);
|
||||
|
||||
g_test_message ("Rotating to right-up");
|
||||
orientation = META_ORIENTATION_RIGHT_UP;
|
||||
@ -5030,6 +5031,7 @@ meta_test_monitor_orientation_changes (void)
|
||||
/* When no touch device is available, the orientation changes are ignored */
|
||||
g_test_message ("Removing touch device");
|
||||
meta_backend_test_remove_device (META_BACKEND_TEST (backend), touch_device);
|
||||
g_clear_object (&touch_device);
|
||||
|
||||
for (i = META_N_ORIENTATIONS - 1; i > META_ORIENTATION_UNDEFINED; i--)
|
||||
{
|
||||
@ -5230,6 +5232,7 @@ meta_test_monitor_orientation_changes_for_transformed_panel (void)
|
||||
/* When no touch device is available, the orientation changes are ignored */
|
||||
g_test_message ("Removing touch device");
|
||||
meta_backend_test_remove_device (META_BACKEND_TEST (backend), touch_device);
|
||||
g_clear_object (&touch_device);
|
||||
|
||||
for (i = META_N_ORIENTATIONS - 1; i > META_ORIENTATION_UNDEFINED; i--)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user