diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2010-11-15 15:18:25 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2010-11-22 13:12:47 (GMT) |
commit | 687d44569dbccea72c582c6d7da9a271ae2c86c8 (patch) | |
tree | c20aa5e504e8fbbf85068be824053a30eea2e025 /src/gui/kernel/qplatformwindowformat_qpa.cpp | |
parent | c5a085cb82a9b8e91e37575e19014b60dd2e4216 (diff) | |
download | Qt-687d44569dbccea72c582c6d7da9a271ae2c86c8.zip Qt-687d44569dbccea72c582c6d7da9a271ae2c86c8.tar.gz Qt-687d44569dbccea72c582c6d7da9a271ae2c86c8.tar.bz2 |
No more windowsurface for QGLWidget in Lighthouse
Reviewed-by: paul
Diffstat (limited to 'src/gui/kernel/qplatformwindowformat_qpa.cpp')
-rw-r--r-- | src/gui/kernel/qplatformwindowformat_qpa.cpp | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/src/gui/kernel/qplatformwindowformat_qpa.cpp b/src/gui/kernel/qplatformwindowformat_qpa.cpp index d497e85..f0dad17 100644 --- a/src/gui/kernel/qplatformwindowformat_qpa.cpp +++ b/src/gui/kernel/qplatformwindowformat_qpa.cpp @@ -53,7 +53,7 @@ public: , opts(QPlatformWindowFormat::DoubleBuffer | QPlatformWindowFormat::DepthBuffer | QPlatformWindowFormat::Rgba | QPlatformWindowFormat::DirectRendering | QPlatformWindowFormat::StencilBuffer | QPlatformWindowFormat::DeprecatedFunctions - | QPlatformWindowFormat::UseDefaultSharedContext) + | QPlatformWindowFormat::UseDefaultSharedContext | QPlatformWindowFormat::HasWindowSurface) , depthSize(-1) , accumSize(-1) , stencilSize(-1) @@ -616,31 +616,32 @@ QPlatformGLContext *QPlatformWindowFormat::sharedGLContext() const return d->sharedContext; } -///*! -// \fn bool QPlatformWindowFormat::hasOverlay() const +/*! + \fn bool QPlatformWindowFormat::hasWindowSurface() const -// Returns true if overlay plane is enabled; otherwise returns false. + Returns true if the corresponding widget has an instance of QWindowSurface. -// Overlay is disabled by default. + Otherwise returns false. -// \sa setOverlay() -//*/ + WindowSurface is enabled by default. -///*! -// If \a enable is true enables an overlay plane; otherwise disables -// the overlay plane. + \sa setOverlay() +*/ -// Enabling the overlay plane will cause QGLWidget to create an -// additional context in an overlay plane. See the QGLWidget -// documentation for further information. +/*! + If \a enable is true a top level QWidget will create a QWindowSurface at creation; -// \sa hasOverlay() -//*/ + otherwise the QWidget will only have a QPlatformWindow. -//void QPlatformWindowFormat::setOverlay(bool enable) -//{ -// setOption(enable ? QPlatformWindowFormat::HasOverlay : QPlatformWindowFormat::NoOverlay); -//} + This is usefull for ie. QGLWidget where the QPlatformGLContext controlls the surface. + + \sa hasOverlay() +*/ + +void QPlatformWindowFormat::setWindowSurface(bool enable) +{ + setOption(enable ? QPlatformWindowFormat::HasWindowSurface : QPlatformWindowFormat::NoWindowSurface); +} /*! Sets the format option to \a opt. |