[wayland] Use setGeometry in resizeWithChecks

Summary:
Configure xdg-toplevel only through setGeometry method, so it's easier
to reason about how geometry is handled in XdgShellClient.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24329
This commit is contained in:
Vlad Zahorodnii 2019-09-26 18:11:25 +03:00
parent 84de8d135d
commit 7c3d014f21

View file

@ -1259,7 +1259,6 @@ void XdgShellClient::handleCommitted()
void XdgShellClient::resizeWithChecks(int w, int h, ForceGeometry_t force) void XdgShellClient::resizeWithChecks(int w, int h, ForceGeometry_t force)
{ {
Q_UNUSED(force)
QRect area = workspace()->clientArea(WorkArea, this); QRect area = workspace()->clientArea(WorkArea, this);
// don't allow growing larger than workarea // don't allow growing larger than workarea
if (w > area.width()) { if (w > area.width()) {
@ -1268,9 +1267,7 @@ void XdgShellClient::resizeWithChecks(int w, int h, ForceGeometry_t force)
if (h > area.height()) { if (h > area.height()) {
h = area.height(); h = area.height();
} }
if (m_xdgShellSurface) { setGeometry(x(), y(), w, h, force);
m_xdgShellSurface->configure(xdgSurfaceStates(), QSize(w, h));
}
} }
void XdgShellClient::unmap() void XdgShellClient::unmap()