diff options
author | Rohan McGovern <rohan.mcgovern@nokia.com> | 2011-09-14 07:45:44 (GMT) |
---|---|---|
committer | Rohan McGovern <rohan.mcgovern@nokia.com> | 2011-09-14 07:45:44 (GMT) |
commit | 1b30b3a6726adf806ae221357393e562285e8346 (patch) | |
tree | c650ff836d3abdf5890726354ee6e2b9bce11304 /src/gui/painting/qwindowsurface_x11.cpp | |
parent | 1c1a5fe0e2d9e28be5e0e14732d79d34c9bb2a74 (diff) | |
parent | 704dd92581783d91ccd234d58896d7078eed14a5 (diff) | |
download | Qt-1b30b3a6726adf806ae221357393e562285e8346.zip Qt-1b30b3a6726adf806ae221357393e562285e8346.tar.gz Qt-1b30b3a6726adf806ae221357393e562285e8346.tar.bz2 |
Merge remote branch 'origin/4.8' into 4.8-from-4.7
Conflicts:
src/gui/text/qtextengine_p.h
src/network/ssl/qsslsocket_openssl.cpp
Diffstat (limited to 'src/gui/painting/qwindowsurface_x11.cpp')
-rw-r--r-- | src/gui/painting/qwindowsurface_x11.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/gui/painting/qwindowsurface_x11.cpp b/src/gui/painting/qwindowsurface_x11.cpp index cf1d386..1a62f47 100644 --- a/src/gui/painting/qwindowsurface_x11.cpp +++ b/src/gui/painting/qwindowsurface_x11.cpp @@ -70,9 +70,6 @@ QX11WindowSurface::QX11WindowSurface(QWidget *widget) #ifndef QT_NO_XRENDER d_ptr->translucentBackground = X11->use_xrender && widget->x11Info().depth() == 32; - setStaticContentsSupport(!d_ptr->translucentBackground); -#else - setStaticContentsSupport(true); #endif } @@ -149,6 +146,8 @@ void QX11WindowSurface::setGeometry(const QRect &rect) return; #ifndef QT_NO_XRENDER if (d_ptr->translucentBackground) { + QPixmap::x11SetDefaultScreen(d_ptr->widget->x11Info().screen()); + QX11PixmapData *data = new QX11PixmapData(QPixmapData::PixmapType); data->xinfo = d_ptr->widget->x11Info(); data->resize(size.width(), size.height()); @@ -251,4 +250,16 @@ QPixmap QX11WindowSurface::grabWidget(const QWidget *widget, return px; } +QWindowSurface::WindowSurfaceFeatures QX11WindowSurface::features() const +{ + WindowSurfaceFeatures features = QWindowSurface::PartialUpdates | QWindowSurface::PreservedContents; +#ifndef QT_NO_XRENDER + if (!d_ptr->translucentBackground) + features |= QWindowSurface::StaticContents; +#else + features |= QWindowSurface::StaticContents; +#endif + return features; +} + QT_END_NAMESPACE |