Update the high scaling settings after an XCB screen is added
Without this, the newly-added screen will still have the scaleFactorProperty unset, which means QScreen::devicePixelRatio will return 1.0. That differs from what happens if the screen had been detected when the application started. This is part of the fix for the bug report, but insufficient. Task-number: QTBUG-53500 Change-Id: Id3aab65533904562a6cbfffd14502365d86bd36d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
parent
32c301e229
commit
fae8ee8b42
@ -32,6 +32,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <QtGui/private/qguiapplication_p.h>
|
#include <QtGui/private/qguiapplication_p.h>
|
||||||
|
#include <QtGui/private/qhighdpiscaling_p.h>
|
||||||
#include <QtCore/QDebug>
|
#include <QtCore/QDebug>
|
||||||
|
|
||||||
#include "qxcbconnection.h"
|
#include "qxcbconnection.h"
|
||||||
@ -257,6 +258,7 @@ void QXcbConnection::updateScreens(const xcb_randr_notify_event_t *event)
|
|||||||
} else {
|
} else {
|
||||||
screen = createScreen(virtualDesktop, output, outputInfo.data());
|
screen = createScreen(virtualDesktop, output, outputInfo.data());
|
||||||
qCDebug(lcQpaScreen) << "output" << screen->name() << "is connected and enabled";
|
qCDebug(lcQpaScreen) << "output" << screen->name() << "is connected and enabled";
|
||||||
|
QHighDpiScaling::updateHighDpiScaling();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (screen) {
|
} else if (screen) {
|
||||||
|
Loading…
Reference in New Issue
Block a user