diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2011-06-22 08:00:28 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2011-06-23 09:09:07 (GMT) |
commit | 0f405371213f7c018f391b0178039414fda41adc (patch) | |
tree | 51e2de68658fecc0d74dce3849a700e9b729ae7f /src/plugins/platforms/wayland/qwaylandwindow.cpp | |
parent | a5c3064439a9f1483565e5d9dfbf0342cd9236f0 (diff) | |
download | Qt-0f405371213f7c018f391b0178039414fda41adc.zip Qt-0f405371213f7c018f391b0178039414fda41adc.tar.gz Qt-0f405371213f7c018f391b0178039414fda41adc.tar.bz2 |
Update the wayland plugin
to shar bfea3d6befdb688d5354e6f15a9400ea637febf9
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylandwindow.cpp')
-rw-r--r-- | src/plugins/platforms/wayland/qwaylandwindow.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index 333a953..240041f 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp @@ -58,6 +58,7 @@ QWaylandWindow::QWaylandWindow(QWidget *window) : QPlatformWindow(window) + , mSurface(0) , mDisplay(QWaylandScreen::waylandScreenFromWidget(window)->display()) , mBuffer(0) , mWaitingForFrameSync(false) @@ -69,8 +70,6 @@ QWaylandWindow::QWaylandWindow(QWidget *window) mDisplay->windowManagerIntegration()->mapClientToProcess(qApp->applicationPid()); mDisplay->windowManagerIntegration()->authenticateWithToken(); #endif - - mSurface = mDisplay->createSurface(this); } QWaylandWindow::~QWaylandWindow() @@ -101,9 +100,7 @@ void QWaylandWindow::setVisible(bool visible) newSurfaceCreated(); } - if (visible) { - wl_surface_map_toplevel(mSurface); - } else { + if (!visible) { wl_surface_destroy(mSurface); mSurface = NULL; } @@ -142,6 +139,8 @@ void QWaylandWindow::damage(const QRegion ®ion) const QRect rect = rects.at(i); wl_surface_damage(mSurface, rect.x(), rect.y(), rect.width(), rect.height()); + wl_buffer_damage(mBuffer->buffer(), + rect.x(), rect.y(), rect.width(), rect.height()); } } |