Windows QPA: Emit QGuiApplication::primaryScreenChanged()
Patch as contributed. Pick-to: 6.6 6.5 Fixes: QTBUG-93368 Change-Id: I8cc884e64e84128b125415e78e3a34245ae4e626 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>bb10
parent
7eb0cc2b4d
commit
01d55f0203
|
|
@ -529,10 +529,14 @@ void QWindowsScreen::handleChanges(const QWindowsScreenData &newData)
|
|||
const bool dpiChanged = !qFuzzyCompare(m_data.dpi.first, newData.dpi.first)
|
||||
|| !qFuzzyCompare(m_data.dpi.second, newData.dpi.second);
|
||||
const bool orientationChanged = m_data.orientation != newData.orientation;
|
||||
const bool primaryChanged = (newData.flags & QWindowsScreenData::PrimaryScreen)
|
||||
&& !(m_data.flags & QWindowsScreenData::PrimaryScreen);
|
||||
m_data.dpi = newData.dpi;
|
||||
m_data.orientation = newData.orientation;
|
||||
m_data.geometry = newData.geometry;
|
||||
m_data.availableGeometry = newData.availableGeometry;
|
||||
m_data.flags = (m_data.flags & ~QWindowsScreenData::PrimaryScreen)
|
||||
| (newData.flags & QWindowsScreenData::PrimaryScreen);
|
||||
|
||||
if (dpiChanged) {
|
||||
QWindowSystemInterface::handleScreenLogicalDotsPerInchChange(screen(),
|
||||
|
|
@ -545,6 +549,8 @@ void QWindowsScreen::handleChanges(const QWindowsScreenData &newData)
|
|||
QWindowSystemInterface::handleScreenGeometryChange(screen(),
|
||||
newData.geometry, newData.availableGeometry);
|
||||
}
|
||||
if (primaryChanged)
|
||||
QWindowSystemInterface::handlePrimaryScreenChanged(this);
|
||||
}
|
||||
|
||||
HMONITOR QWindowsScreen::handle() const
|
||||
|
|
|
|||
Loading…
Reference in New Issue