summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGiulio Camuffo <giulio.camuffo@jollamobile.com>2014-09-12 22:19:45 +0300
committerGiulio Camuffo <giulio.camuffo@jollamobile.com>2014-09-15 11:45:59 +0200
commit99c1b8e53f9a2ba6e8c549f15b0d3008bf12c3f1 (patch)
treeb3a02a0c4247d6a0c59da28a68eb43723e91789e /src
parenta7d9523c9cf731f3f6dd9424fc409eb315800153 (diff)
Don't give bogus values for a screen physical size
If we don't have a valid physical size for a screen, i.e. (0x0), return the default value from the base class. Change-Id: Ia7b6f90ee73e07014ab752ceb165426812c49415 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/client/qwaylandscreen.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/qwaylandscreen.cpp b/src/client/qwaylandscreen.cpp
index 9c34baeed..943e29a05 100644
--- a/src/client/qwaylandscreen.cpp
+++ b/src/client/qwaylandscreen.cpp
@@ -97,7 +97,10 @@ QImage::Format QWaylandScreen::format() const
QSizeF QWaylandScreen::physicalSize() const
{
- return mPhysicalSize;
+ if (mPhysicalSize.isNull())
+ return QPlatformScreen::physicalSize();
+ else
+ return mPhysicalSize;
}
QDpi QWaylandScreen::logicalDpi() const