kms/update: Treat NULL main context as default for page flips too

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2777>
This commit is contained in:
Jonas Ådahl 2022-12-21 18:52:01 +01:00
parent 40caa6d87c
commit 5bed90114d

View File

@ -506,6 +506,9 @@ meta_kms_update_add_page_flip_listener (MetaKmsUpdate *upd
g_assert (meta_kms_crtc_get_device (crtc) == update->device); g_assert (meta_kms_crtc_get_device (crtc) == update->device);
if (!main_context)
main_context = g_main_context_default ();
listener = g_new0 (MetaKmsPageFlipListener, 1); listener = g_new0 (MetaKmsPageFlipListener, 1);
*listener = (MetaKmsPageFlipListener) { *listener = (MetaKmsPageFlipListener) {
.crtc = crtc, .crtc = crtc,