summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wayland/qwaylandwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylandwindow.cpp')
-rw-r--r--src/plugins/platforms/wayland/qwaylandwindow.cpp9
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 &region)
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());
}
}