xcb: compare with screen name instead of old monitor info
because the old xcb_randr_monitor_info_t was invalid very often during update. Pick-to: 6.3 Change-Id: I8c0bda93bde4e816fc98cde1a7205c6369ab39e1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
59860685a1
commit
4609cc8631
@ -330,10 +330,9 @@ QXcbScreen *QXcbConnection::findScreenForMonitorInfo(const QList<QPlatformScreen
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < screens.size(); ++i) {
|
for (int i = 0; i < screens.size(); ++i) {
|
||||||
auto s = static_cast<QXcbScreen*>(screens[i]);
|
auto s = static_cast<QXcbScreen*>(screens[i]);
|
||||||
if (s->m_monitor && monitorInfo) {
|
if (monitorInfo) {
|
||||||
QByteArray ba1 = atomName(s->m_monitor->name);
|
|
||||||
QByteArray ba2 = atomName(monitorInfo->name);
|
QByteArray ba2 = atomName(monitorInfo->name);
|
||||||
if (ba1 == ba2)
|
if (s->name().toLocal8Bit() == ba2)
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,7 @@ void tst_QScreen_Xrandr::xrandr_15_scale()
|
|||||||
QVERIFY(height2 == expectedHeight);
|
QVERIFY(height2 == expectedHeight);
|
||||||
QVERIFY(width2 == expectedWidth);
|
QVERIFY(width2 == expectedWidth);
|
||||||
|
|
||||||
QSignalSpy geometryChangedSpy2(screen1, &QScreen::geometryChanged);
|
QSignalSpy geometryChangedSpy2(screen2, &QScreen::geometryChanged);
|
||||||
|
|
||||||
// "xrandr --output name1 --scale 1x1"
|
// "xrandr --output name1 --scale 1x1"
|
||||||
args.clear();
|
args.clear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user