kms: Resume all devices when KMS is resumed

KMS is resumed when the current VT becomes active.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3534>
This commit is contained in:
Dor Askayo 2024-01-19 02:28:12 +02:00 committed by Marge Bot
parent 9eb38b4107
commit 79063604ad

View File

@ -272,10 +272,23 @@ handle_hotplug_event (MetaKms *kms,
meta_kms_emit_resources_changed (kms, changes);
}
static gpointer
resume_in_impl (MetaThreadImpl *thread_impl,
gpointer user_data,
GError **error)
{
MetaKmsImpl *impl = META_KMS_IMPL (thread_impl);
meta_kms_impl_resume (impl);
return GINT_TO_POINTER (TRUE);
}
void
meta_kms_resume (MetaKms *kms)
{
handle_hotplug_event (kms, NULL, META_KMS_RESOURCE_CHANGE_FULL);
meta_kms_run_impl_task_sync (kms, resume_in_impl, NULL, NULL);
}
static void