[mutter] backends/kms: Always perform full changes on KMS resume
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] backends/kms: Always perform full changes on KMS resume
- Date: Mon, 20 Sep 2021 16:07:16 +0000 (UTC)
commit 9cb35e2c80ee88d4c6ae82638ee7d17a9203ac59
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Mon Mar 22 17:41:01 2021 +0100
backends/kms: Always perform full changes on KMS resume
Resume happens after we may have received various events that we've
ignored, so at this point we need to just emit an hotplug event like if
everything changed so that user settings may be re-applied.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1964>
src/backends/native/meta-kms.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/src/backends/native/meta-kms.c b/src/backends/native/meta-kms.c
index a1d483760a..0750278ae5 100644
--- a/src/backends/native/meta-kms.c
+++ b/src/backends/native/meta-kms.c
@@ -649,12 +649,11 @@ meta_kms_update_states_sync (MetaKms *kms,
}
static void
-handle_hotplug_event (MetaKms *kms,
- GUdevDevice *udev_device)
+handle_hotplug_event (MetaKms *kms,
+ GUdevDevice *udev_device,
+ MetaKmsUpdateChanges changes)
{
- MetaKmsUpdateChanges changes;
-
- changes = meta_kms_update_states_sync (kms, udev_device);
+ changes |= meta_kms_update_states_sync (kms, udev_device);
if (changes != META_KMS_UPDATE_CHANGE_NONE)
g_signal_emit (kms, signals[RESOURCES_CHANGED], 0, changes);
@@ -663,7 +662,7 @@ handle_hotplug_event (MetaKms *kms,
void
meta_kms_resume (MetaKms *kms)
{
- handle_hotplug_event (kms, NULL);
+ handle_hotplug_event (kms, NULL, META_KMS_UPDATE_CHANGE_FULL);
}
static void
@@ -671,7 +670,7 @@ on_udev_hotplug (MetaUdev *udev,
GUdevDevice *udev_device,
MetaKms *kms)
{
- handle_hotplug_event (kms, udev_device);
+ handle_hotplug_event (kms, udev_device, META_KMS_UPDATE_CHANGE_NONE);
}
static void
@@ -679,7 +678,7 @@ on_udev_device_removed (MetaUdev *udev,
GUdevDevice *device,
MetaKms *kms)
{
- handle_hotplug_event (kms, NULL);
+ handle_hotplug_event (kms, NULL, META_KMS_UPDATE_CHANGE_NONE);
}
MetaBackend *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]