From 43696a9e4230ae1952fa9d8d6ef400d7df0f1c6e Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 23 Jan 2012 12:11:42 +0100 Subject: directfb: Deal with Qt trying to create a QSize(0, 0) platfom window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Qt will attempt to create a platform window with the above size and DirectFB will fail to create the window. Make sure the width/height is at least 1 before handing it to DirectFB. According to Samuel it is legitimate to create a QPlatformWindow with QSize(0, 0) and it is the job of the platform plugin to make it work. Follow the approach of the XCB plugin and increase the size. Change-Id: Ifc92780b46f1a73123945988d06bd21a3deb6bb0 Reviewed-by: Jonas Gastal Reviewed-by: Samuel Rødal --- src/plugins/platforms/directfb/qdirectfbwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/directfb/qdirectfbwindow.cpp b/src/plugins/platforms/directfb/qdirectfbwindow.cpp index d536ddb153..b65e3b4d10 100644 --- a/src/plugins/platforms/directfb/qdirectfbwindow.cpp +++ b/src/plugins/platforms/directfb/qdirectfbwindow.cpp @@ -65,8 +65,8 @@ QDirectFbWindow::QDirectFbWindow(QWindow *tlw, QDirectFbInput *inputhandler) |DWDESC_OPTIONS #endif |DWDESC_CAPS); - description.width = tlw->width(); - description.height = tlw->height(); + description.width = qMax(1, tlw->width()); + description.height = qMax(1, tlw->height()); description.posx = tlw->x(); description.posy = tlw->y(); @@ -213,4 +213,4 @@ IDirectFBSurface *QDirectFbWindow::dfbSurface() return m_dfbSurface.data(); } -QT_END_NAMESPACE \ No newline at end of file +QT_END_NAMESPACE -- cgit v1.2.3