diff options
Diffstat (limited to 'src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index 211e8a5..84a74c9 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp @@ -79,6 +79,7 @@ public: IDirectFBScreen *dfbScreen; #ifdef QT_NO_DIRECTFB_WM IDirectFBSurface *primarySurface; + QColor backgroundColor; #endif #ifndef QT_NO_DIRECTFB_LAYER IDirectFBDisplayLayer *dfbLayer; @@ -94,7 +95,6 @@ public: #if defined QT_DIRECTFB_IMAGEPROVIDER && defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE IDirectFBImageProvider *imageProvider; #endif - QColor backgroundColor; IDirectFBSurface *cursorSurface; qint64 cursorImageKey; @@ -1277,10 +1277,9 @@ bool QDirectFBScreen::connect(const QString &displaySpec) if (displayArgs.contains(QLatin1String("debug"), Qt::CaseInsensitive)) printDirectFBInfo(d_ptr->dfb, surface); #endif -#ifndef QT_NO_DIRECTFB_WM +#ifdef QT_DIRECTFB_WM surface->Release(surface); -#endif - +#else QRegExp backgroundColorRegExp(QLatin1String("bgcolor=?(.+)")); backgroundColorRegExp.setCaseSensitivity(Qt::CaseInsensitive); if (displayArgs.indexOf(backgroundColorRegExp) != -1) { @@ -1288,6 +1287,11 @@ bool QDirectFBScreen::connect(const QString &displaySpec) } if (!d_ptr->backgroundColor.isValid()) d_ptr->backgroundColor = Qt::green; + d_ptr->primarySurface->Clear(d_ptr->primarySurface, d_ptr->backgroundColor.red(), + d_ptr->backgroundColor.green(), d_ptr->backgroundColor.blue(), + d_ptr->backgroundColor.alpha()); + d_ptr->primarySurface->Flip(d_ptr->primarySurface, 0, d_ptr->flipFlags); +#endif return true; } @@ -1568,11 +1572,6 @@ void QDirectFBScreen::solidFill(const QColor &color, const QRegion ®ion) #endif } -void QDirectFBScreen::erase(const QRegion ®ion) -{ - solidFill(d_ptr->backgroundColor, region); -} - QImage::Format QDirectFBScreen::alphaPixmapFormat() const { return d_ptr->alphaPixmapFormat; |