Skip to content

Commit

Permalink
Add sendConfigure() for WaylandSurface
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ElvisLee authored and Jørgen Lind committed Aug 17, 2012
1 parent abdce58 commit cb62bee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/compositor/compositor_api/waylandsurface.cpp
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/compositor/compositor_api/waylandsurface.h
Expand Up @@ -111,6 +111,7 @@ class Q_COMPOSITOR_EXPORT WaylandSurface : public QObject
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;
Expand Down

0 comments on commit cb62bee

Please sign in to comment.