Add sendConfigure() for WaylandSurface
authorElvis Lee <kwangwoong.lee@lge.com>
Tue, 14 Aug 2012 11:20:56 +0000 (20:20 +0900)
committerJørgen Lind <jorgen.lind@nokia.com>
Fri, 17 Aug 2012 06:00:10 +0000 (08:00 +0200)
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>
src/compositor/compositor_api/waylandsurface.cpp
src/compositor/compositor_api/waylandsurface.h

index 9aa6c28..bc30fb4 100644 (file)
@@ -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);
index 76e0840..96cb239 100644 (file)
@@ -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;