From a3fa898878a8324f88d73204b682ea72ea759cc5 Mon Sep 17 00:00:00 2001 From: Giulio Camuffo Date: Wed, 17 Sep 2014 14:27:15 +0300 Subject: [PATCH] Ignore negative screen physical size Weston can send in some cases a negative physical size in the wl_output.geometry event. While it is not clear whether that is legal go the extra mile and catch it. Change-Id: Ie2fbab84e653ad77732a72b6ca61509eb7849895 Reviewed-by: Laszlo Agocs --- src/plugins/platforms/wayland/qwaylandscreen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/wayland/qwaylandscreen.cpp b/src/plugins/platforms/wayland/qwaylandscreen.cpp index 943e29a05c1..88667ae0d4f 100644 --- a/src/plugins/platforms/wayland/qwaylandscreen.cpp +++ b/src/plugins/platforms/wayland/qwaylandscreen.cpp @@ -97,7 +97,7 @@ QImage::Format QWaylandScreen::format() const QSizeF QWaylandScreen::physicalSize() const { - if (mPhysicalSize.isNull()) + if (mPhysicalSize.isEmpty()) return QPlatformScreen::physicalSize(); else return mPhysicalSize;