diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2014-11-15 18:52:23 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-11-15 18:52:23 +0100 |
commit | 6b8b6b80a1852c1e4d0a626129d4382d11423a54 (patch) | |
tree | 499a3b70704680f03841acb4c170af2e57fd1358 /src/client/qwaylandshmbackingstore.cpp | |
parent | adc12b2ef322e59a7c65600da91e8b642a94b187 (diff) | |
parent | 4613291e8c1717d8d3316b2c0b1f2c6c96bdc56f (diff) | |
download | qtwayland-6b8b6b80a1852c1e4d0a626129d4382d11423a54.tar.gz |
Merge "Merge branch '5.4' into dev" into refs/staging/dev
Diffstat (limited to 'src/client/qwaylandshmbackingstore.cpp')
-rw-r--r-- | src/client/qwaylandshmbackingstore.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/client/qwaylandshmbackingstore.cpp b/src/client/qwaylandshmbackingstore.cpp index 14e1285d..d407335d 100644 --- a/src/client/qwaylandshmbackingstore.cpp +++ b/src/client/qwaylandshmbackingstore.cpp @@ -42,7 +42,7 @@ #include "qwaylandwindow_p.h" #include "qwaylanddisplay_p.h" #include "qwaylandscreen_p.h" -#include "qwaylanddecoration_p.h" +#include "qwaylandabstractdecoration_p.h" #include <QtCore/qdebug.h> #include <QtGui/QPainter> @@ -140,6 +140,9 @@ QWaylandShmBackingStore::QWaylandShmBackingStore(QWindow *window) QWaylandShmBackingStore::~QWaylandShmBackingStore() { + if (QWaylandWindow *w = waylandWindow()) + w->setBackingStore(Q_NULLPTR); + if (mFrameCallback) wl_callback_destroy(mFrameCallback); @@ -175,6 +178,14 @@ void QWaylandShmBackingStore::endPaint() waylandWindow()->setCanResize(true); } +void QWaylandShmBackingStore::hidden() +{ + if (mFrameCallback) { + wl_callback_destroy(mFrameCallback); + mFrameCallback = Q_NULLPTR; + } +} + void QWaylandShmBackingStore::ensureSize() { waylandWindow()->setBackingStore(this); @@ -295,7 +306,7 @@ void QWaylandShmBackingStore::updateDecorations() decorationPainter.drawImage(target, sourceImage, target); } -QWaylandDecoration *QWaylandShmBackingStore::windowDecoration() const +QWaylandAbstractDecoration *QWaylandShmBackingStore::windowDecoration() const { return waylandWindow()->decoration(); } @@ -312,6 +323,7 @@ QWaylandWindow *QWaylandShmBackingStore::waylandWindow() const return static_cast<QWaylandWindow *>(window()->handle()); } +#ifndef QT_NO_OPENGL QImage QWaylandShmBackingStore::toImage() const { // Invoked from QPlatformBackingStore::composeAndFlush() that is called @@ -320,6 +332,7 @@ QImage QWaylandShmBackingStore::toImage() const return *contentSurface(); } +#endif // QT_NO_OPENGL void QWaylandShmBackingStore::done(void *data, wl_callback *callback, uint32_t time) { |