From f4d63bb8ed944e66fc7e72b74d61d3649213298c Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Mon, 30 Aug 2021 15:10:28 +0200 Subject: [PATCH] platforms/drm: first emit outputDisabled, then remove output The current behavior is in contradiction to the description of Platform::outputDisabled --- src/plugins/platforms/drm/drm_backend.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/drm/drm_backend.cpp b/src/plugins/platforms/drm/drm_backend.cpp index 775b5db2c0..7e3d8afe64 100644 --- a/src/plugins/platforms/drm/drm_backend.cpp +++ b/src/plugins/platforms/drm/drm_backend.cpp @@ -349,8 +349,9 @@ void DrmBackend::removeOutput(DrmAbstractOutput *o) // placeholder doesn't actually need to render anything m_placeHolderOutput->renderLoop()->inhibit(); } - if (m_enabledOutputs.removeOne(o)) { + if (m_enabledOutputs.contains(o)) { Q_EMIT outputDisabled(o); + m_enabledOutputs.removeOne(o); } m_outputs.removeOne(o); Q_EMIT outputRemoved(o);