summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorElvis Lee <kwangwoong.lee@lge.com>2012-08-14 20:20:56 +0900
committerJørgen Lind <jorgen.lind@nokia.com>2012-08-17 08:00:10 +0200
commitcb62bee7fa6a01050dddb767ccd4353b616244fe (patch)
tree54b9d5b512375de52a2de383623557d9d575d4f1 /src
parentabdce5881c2d2ae129addc600ad0236660b9fc70 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/compositor/compositor_api/waylandsurface.cpp7
-rw-r--r--src/compositor/compositor_api/waylandsurface.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/compositor/compositor_api/waylandsurface.cpp b/src/compositor/compositor_api/waylandsurface.cpp
index 9aa6c2806..bc30fb496 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 76e08400c..96cb239e7 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;