summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbscreen.h
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2015-04-21 18:54:55 +0300
committerAlexander Volkov <a.volkov@rusbitech.ru>2015-04-30 09:55:07 +0000
commitfe086ddb9e4640489595a4c12aef6a27b989ed70 (patch)
tree4a81ee8e35463b3670c7c50bb6279f7e62af71eb /src/plugins/platforms/xcb/qxcbscreen.h
parent631eb12dd25b50389535947f305f2111550b9a69 (diff)
xcb: Fix updating physical screen size
X server may return an empty physical screen size, for example on VNC, Xephyr or some not very well supported hardware. In this case it's possible to use the size of the virtual desktop, but until now it was done only in the QXcbScreen constructor. Move it to QXcbScreen::updateGeometry() and calculate physical screen size using the DPI of the virtual desktop. Task-number: QTBUG-45564 Change-Id: I6b757818a2fcefdd7b2c0aa31b840a88d625d6ae Reviewed-by: Daniel Vrátil <dvratil@redhat.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbscreen.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h
index a29efc1e79..ec05e3bb25 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.h
+++ b/src/plugins/platforms/xcb/qxcbscreen.h
@@ -94,6 +94,7 @@ public:
QSizeF physicalSize() const Q_DECL_OVERRIDE { return m_sizeMillimeters; }
QSize virtualSize() const { return m_virtualSize; }
QSizeF physicalVirtualSize() const { return m_virtualSizeMillimeters; }
+ QDpi virtualDpi() const;
QDpi logicalDpi() const Q_DECL_OVERRIDE;
qreal devicePixelRatio() const Q_DECL_OVERRIDE;
QPlatformCursor *cursor() const Q_DECL_OVERRIDE;