diff options
author | Elvis Lee <kwangwoong.lee@lge.com> | 2012-08-14 20:20:56 +0900 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2012-08-17 08:00:10 +0200 |
commit | cb62bee7fa6a01050dddb767ccd4353b616244fe (patch) | |
tree | 54b9d5b512375de52a2de383623557d9d575d4f1 | |
parent | abdce5881c2d2ae129addc600ad0236660b9fc70 (diff) | |
download | qtwayland-cb62bee7fa6a01050dddb767ccd4353b616244fe.tar.gz |
Add sendConfigure() for WaylandSurface
If compositor calls directly setSize() for surface, it changes only the
size of the surface's boundary. If it is needed to change the contents
of the surface synchronously, send_configure() must be called.
Change-Id: I9c607b57c6d31d4ada6621dc57063f36f24b9d95
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
-rw-r--r-- | src/compositor/compositor_api/waylandsurface.cpp | 7 | ||||
-rw-r--r-- | src/compositor/compositor_api/waylandsurface.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/compositor/compositor_api/waylandsurface.cpp b/src/compositor/compositor_api/waylandsurface.cpp index 9aa6c280..bc30fb49 100644 --- a/src/compositor/compositor_api/waylandsurface.cpp +++ b/src/compositor/compositor_api/waylandsurface.cpp @@ -154,6 +154,13 @@ void WaylandSurface::setSize(const QSize &size) d->surface->setSize(size); } +void WaylandSurface::sendConfigure(const QSize &size) +{ + Q_D(WaylandSurface); + if (d->surface->shellSurface()) + d->surface->shellSurface()->sendConfigure(WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT, size.width(), size.height()); +} + Qt::ScreenOrientations WaylandSurface::orientationUpdateMask() const { Q_D(const WaylandSurface); diff --git a/src/compositor/compositor_api/waylandsurface.h b/src/compositor/compositor_api/waylandsurface.h index 76e08400..96cb239e 100644 --- a/src/compositor/compositor_api/waylandsurface.h +++ b/src/compositor/compositor_api/waylandsurface.h @@ -111,6 +111,7 @@ public: void setPos(const QPointF &pos); QSize size() const; void setSize(const QSize &size); + void sendConfigure(const QSize &size); Qt::ScreenOrientations orientationUpdateMask() const; Qt::ScreenOrientation contentOrientation() const; |