From 5bed90114d1495745b730ca9e3885cd444a768bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 21 Dec 2022 18:52:01 +0100 Subject: [PATCH] kms/update: Treat NULL main context as default for page flips too Part-of: --- src/backends/native/meta-kms-update.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backends/native/meta-kms-update.c b/src/backends/native/meta-kms-update.c index 0968036ec..c7fd5dcff 100644 --- a/src/backends/native/meta-kms-update.c +++ b/src/backends/native/meta-kms-update.c @@ -506,6 +506,9 @@ meta_kms_update_add_page_flip_listener (MetaKmsUpdate *upd 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 = (MetaKmsPageFlipListener) { .crtc = crtc,