summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2013-12-18 14:18:03 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-30 09:17:47 +0100
commit5ee3d1e45621da51faaab08cf13d16f22b314309 (patch)
tree18604c57bfd334cea9ae99414b50c43a3f0f121e /src/plugins
parent48ecb2d434d68abc39645b261cc9c1b0551a703e (diff)
XCB: Don't recalculate the DPI if we have a forced DPI setting
logicalDpi() already has the logic to check m_forcedDpi, so let's reuse it. I hope it's not a problem that we send a signal that it changed when nothing changed. [ChangeLog][Platform Specific Changes][X11 / XCB]Fixed a bug that caused Qt applications to think the screen DPI had changed when it had not, after connecting or disconnecting monitors. Task-number: QTBUG-32683 Change-Id: I45dd27de5109e65e7599915f11cfdb633a65a67c Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index 5fcaf18aef..b1ef3182ba 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -373,9 +373,9 @@ void QXcbScreen::handleScreenChange(xcb_randr_screen_change_notify_event_t *chan
QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), geometry());
QWindowSystemInterface::handleScreenAvailableGeometryChange(QPlatformScreen::screen(), availableGeometry());
QWindowSystemInterface::handleScreenOrientationChange(QPlatformScreen::screen(), m_orientation);
- QWindowSystemInterface::handleScreenLogicalDotsPerInchChange(QPlatformScreen::screen(),
- Q_MM_PER_INCH * m_virtualSize.width() / m_virtualSizeMillimeters.width(),
- Q_MM_PER_INCH * m_virtualSize.height() / m_virtualSizeMillimeters.height());
+
+ QDpi ldpi = logicalDpi();
+ QWindowSystemInterface::handleScreenLogicalDotsPerInchChange(QPlatformScreen::screen(), ldpi.first, ldpi.second);
}
void QXcbScreen::updateGeometry(xcb_timestamp_t timestamp)