From 3199d4bbb8c6df0a2d2b3b1be093c60c04f8c0f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= Date: Mon, 16 Sep 2024 16:16:45 +0200 Subject: [PATCH] wayland/drm-lease: Do not add connector twice on lease disappeared lease_disappeared() was calling meta_drm_lease_disappeared() and set_connectors_as_available(). meta_drm_lease_disappeared() emits the "revoked" signal, connected to on_lease_revoked(), which marks the leased connectors as available by calling set_connectors_as_available(). Therefore, calling set_connectors_as_available() again from lease_disappeared() is redundant. Remove the redundant call to set_connectors_as_available() and drop two unused functions. Fixes: fc44437876ee ("wayland/drm-lease: Withdrawn leased connectors") Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3675 Part-of: --- src/backends/native/meta-drm-lease.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/backends/native/meta-drm-lease.c b/src/backends/native/meta-drm-lease.c index 7efceb0db..7cddb6c8e 100644 --- a/src/backends/native/meta-drm-lease.c +++ b/src/backends/native/meta-drm-lease.c @@ -386,12 +386,6 @@ meta_drm_lease_revoke (MetaDrmLease *lease) mark_revoked (lease); } -static void -meta_drm_lease_disappeared (MetaDrmLease *lease) -{ - mark_revoked (lease); -} - static void meta_drm_lease_dispose (GObject *object) { @@ -768,14 +762,6 @@ update_resources (MetaDrmLeaseManager *lease_manager) } } -static void -lease_disappeared (MetaDrmLeaseManager *lease_manager, - MetaDrmLease *lease) -{ - meta_drm_lease_disappeared (lease); - set_connectors_as_available (lease_manager, lease); -} - static gboolean did_lease_disappear (MetaDrmLease *lease, uint32_t *lessees, @@ -832,7 +818,7 @@ update_leases (MetaDrmLeaseManager *lease_manager) { lease = l->data; - lease_disappeared (lease_manager, lease); + mark_revoked (lease); } }