mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 08:30:42 -05:00
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>
This commit is contained in:
parent
dd0ad3bfb1
commit
9cb35e2c80
@ -650,11 +650,10 @@ meta_kms_update_states_sync (MetaKms *kms,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
handle_hotplug_event (MetaKms *kms,
|
handle_hotplug_event (MetaKms *kms,
|
||||||
GUdevDevice *udev_device)
|
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)
|
if (changes != META_KMS_UPDATE_CHANGE_NONE)
|
||||||
g_signal_emit (kms, signals[RESOURCES_CHANGED], 0, changes);
|
g_signal_emit (kms, signals[RESOURCES_CHANGED], 0, changes);
|
||||||
@ -663,7 +662,7 @@ handle_hotplug_event (MetaKms *kms,
|
|||||||
void
|
void
|
||||||
meta_kms_resume (MetaKms *kms)
|
meta_kms_resume (MetaKms *kms)
|
||||||
{
|
{
|
||||||
handle_hotplug_event (kms, NULL);
|
handle_hotplug_event (kms, NULL, META_KMS_UPDATE_CHANGE_FULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -671,7 +670,7 @@ on_udev_hotplug (MetaUdev *udev,
|
|||||||
GUdevDevice *udev_device,
|
GUdevDevice *udev_device,
|
||||||
MetaKms *kms)
|
MetaKms *kms)
|
||||||
{
|
{
|
||||||
handle_hotplug_event (kms, udev_device);
|
handle_hotplug_event (kms, udev_device, META_KMS_UPDATE_CHANGE_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -679,7 +678,7 @@ on_udev_device_removed (MetaUdev *udev,
|
|||||||
GUdevDevice *device,
|
GUdevDevice *device,
|
||||||
MetaKms *kms)
|
MetaKms *kms)
|
||||||
{
|
{
|
||||||
handle_hotplug_event (kms, NULL);
|
handle_hotplug_event (kms, NULL, META_KMS_UPDATE_CHANGE_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
MetaBackend *
|
MetaBackend *
|
||||||
|
Loading…
Reference in New Issue
Block a user