summaryrefslogtreecommitdiffstats
path: root/src/plugins/gfxdrivers
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2009-09-02 08:28:46 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2009-09-02 08:32:39 (GMT)
commit05e30a4aa7ae5ea552c459fc7d64c8270ec34105 (patch)
treef3d344f9fec047b304f57cb399c70a31450bf54f /src/plugins/gfxdrivers
parent6a7e6d47e307b4a181812b1bd5cfb57903ea7f76 (diff)
downloadQt-05e30a4aa7ae5ea552c459fc7d64c8270ec34105.zip
Qt-05e30a4aa7ae5ea552c459fc7d64c8270ec34105.tar.gz
Qt-05e30a4aa7ae5ea552c459fc7d64c8270ec34105.tar.bz2
Fix DirectFB driver when comipled with NO_WM
Reviewed-by: Tom
Diffstat (limited to 'src/plugins/gfxdrivers')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp4
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
index 599b2a9..179936d 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
@@ -1209,7 +1209,11 @@ bool QDirectFBScreen::connect(const QString &displaySpec)
"Unable to get screen!", result);
return false;
}
+#ifdef QT_NO_DIRECTFB_WM
+ result = d_ptr->primarySurface->GetSize(d_ptr->primarySurface, &w, &h);
+#else
result = d_ptr->dfbScreen->GetSize(d_ptr->dfbScreen, &w, &h);
+#endif
if (result != DFB_OK) {
DirectFBError("QDirectFBScreen::connect: "
"Unable to get screen size!", result);
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
index e288199..9a966a1 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
@@ -431,11 +431,13 @@ IDirectFBSurface *QDirectFBWindowSurface::directFBSurface() const
IDirectFBSurface *QDirectFBWindowSurface::surfaceForWidget(const QWidget *widget, QRect *rect) const
{
Q_ASSERT(widget);
+#ifndef QT_NO_DIRECTFB_WM
if (!dfbSurface) {
if (sibling && (!sibling->sibling || sibling->dfbSurface))
return sibling->surfaceForWidget(widget, rect);
return 0;
}
+#endif
QWidget *win = window();
Q_ASSERT(win);
if (rect) {