summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wayland/qwaylandwindow.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2011-06-22 08:00:28 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2011-06-23 09:09:07 (GMT)
commit0f405371213f7c018f391b0178039414fda41adc (patch)
tree51e2de68658fecc0d74dce3849a700e9b729ae7f /src/plugins/platforms/wayland/qwaylandwindow.cpp
parenta5c3064439a9f1483565e5d9dfbf0342cd9236f0 (diff)
downloadQt-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.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());
}
}