From 7c2c213f521233734921e3ed3b91996964169df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9ven=20Car?= Date: Sat, 13 Feb 2021 16:00:30 +0100 Subject: [PATCH] QPA Integration: Save enabled screens Since QWindowSystemInterface::handleScreenRemoved would not be called in Integration::handleScreenDisabled, Qt apps would still reference disabled screens resulting in crashes. --- src/plugins/qpa/integration.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/qpa/integration.cpp b/src/plugins/qpa/integration.cpp index 1aca0c59db..c0f2d760af 100644 --- a/src/plugins/qpa/integration.cpp +++ b/src/plugins/qpa/integration.cpp @@ -154,6 +154,7 @@ void Integration::handleOutputEnabled(AbstractOutput *output) { Screen *platformScreen = new Screen(output); QWindowSystemInterface::handleScreenAdded(platformScreen); + m_screens.insert(output, platformScreen); if (m_dummyScreen) { QWindowSystemInterface::handleScreenRemoved(m_dummyScreen);