tests/ref-test: Inhibit hardware cursors for ref tests
We run some ref-tests in the tty and kms test harnesses which does support cursor planes. If we get "unlucky", the cursor could end up on one of them and won't show up in the captured output. Inhibit the hardware cursor when capturing the output for a ref-test. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4307>
This commit is contained in:
parent
4a0b672146
commit
b126b01490
@ -246,8 +246,10 @@ void meta_backend_add_hw_cursor_inhibitor (MetaBackend *backend,
|
||||
void meta_backend_remove_hw_cursor_inhibitor (MetaBackend *backend,
|
||||
MetaHwCursorInhibitor *inhibitor);
|
||||
|
||||
META_EXPORT_TEST
|
||||
void meta_backend_inhibit_hw_cursor (MetaBackend *backend);
|
||||
|
||||
META_EXPORT_TEST
|
||||
void meta_backend_uninhibit_hw_cursor (MetaBackend *backend);
|
||||
|
||||
META_EXPORT_TEST
|
||||
|
@ -158,6 +158,7 @@ capture_view (ClutterStageView *stage_view)
|
||||
CaptureViewData data = { 0 };
|
||||
|
||||
meta_compositor_disable_unredirect (compositor);
|
||||
meta_backend_inhibit_hw_cursor (backend);
|
||||
|
||||
data.loop = g_main_loop_new (NULL, FALSE);
|
||||
data.watch = meta_stage_watch_view (stage, stage_view,
|
||||
@ -173,6 +174,7 @@ capture_view (ClutterStageView *stage_view)
|
||||
g_assert_null (data.watch);
|
||||
g_assert_nonnull (data.out_image);
|
||||
|
||||
meta_backend_uninhibit_hw_cursor (backend);
|
||||
meta_compositor_enable_unredirect (compositor);
|
||||
|
||||
return data.out_image;
|
||||
|
Loading…
x
Reference in New Issue
Block a user