Commit 7c3d014f authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

[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
parent 84de8d13
...@@ -1259,7 +1259,6 @@ void XdgShellClient::handleCommitted() ...@@ -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) ...@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment