diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2012-01-23 12:11:42 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-23 12:52:27 +0100 |
commit | 43696a9e4230ae1952fa9d8d6ef400d7df0f1c6e (patch) | |
tree | f09f84b296c413ea0080c4223f67d5813611b4df /src/plugins/platforms/directfb/qdirectfbwindow.cpp | |
parent | cdb61839f4a1c139a736032b7a08fcd504234095 (diff) |
directfb: Deal with Qt trying to create a QSize(0, 0) platfom window
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 <jgastal@profusion.mobi>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/plugins/platforms/directfb/qdirectfbwindow.cpp')
-rw-r--r-- | src/plugins/platforms/directfb/qdirectfbwindow.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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 |