diff --git a/abstract_client.h b/abstract_client.h --- a/abstract_client.h +++ b/abstract_client.h @@ -625,7 +625,7 @@ void updateLayer(); enum ForceGeometry_t { NormalGeometrySet, ForceGeometrySet }; - virtual void move(int x, int y, ForceGeometry_t force = NormalGeometrySet); + void move(int x, int y, ForceGeometry_t force = NormalGeometrySet); void move(const QPoint &p, ForceGeometry_t force = NormalGeometrySet); virtual void resizeWithChecks(int w, int h, ForceGeometry_t force = NormalGeometrySet) = 0; void resizeWithChecks(const QSize& s, ForceGeometry_t force = NormalGeometrySet); @@ -1025,11 +1025,6 @@ virtual void changeMaximize(bool horizontal, bool vertical, bool adjust) = 0; virtual void setGeometryRestore(const QRect &geo) = 0; - /** - * Called from move after updating the geometry. Can be reimplemented to perform specific tasks. - * The base implementation does nothing. - */ - virtual void doMove(int x, int y); void blockGeometryUpdates(bool block); void blockGeometryUpdates(); void unblockGeometryUpdates(); @@ -1317,11 +1312,6 @@ AbstractClient* cl; }; -inline void AbstractClient::move(const QPoint& p, ForceGeometry_t force) -{ - move(p.x(), p.y(), force); -} - inline void AbstractClient::resizeWithChecks(const QSize& s, AbstractClient::ForceGeometry_t force) { resizeWithChecks(s.width(), s.height(), force); diff --git a/abstract_client.cpp b/abstract_client.cpp --- a/abstract_client.cpp +++ b/abstract_client.cpp @@ -794,33 +794,12 @@ void AbstractClient::move(int x, int y, ForceGeometry_t force) { - // resuming geometry updates is handled only in setGeometry() - Q_ASSERT(pendingGeometryUpdate() == PendingGeometryNone || areGeometryUpdatesBlocked()); - QPoint p(x, y); - if (!areGeometryUpdatesBlocked() && p != rules()->checkPosition(p)) { - qCDebug(KWIN_CORE) << "forced position fail:" << p << ":" << rules()->checkPosition(p); - } - if (force == NormalGeometrySet && m_frameGeometry.topLeft() == p) - return; - m_frameGeometry.moveTopLeft(p); - if (areGeometryUpdatesBlocked()) { - if (pendingGeometryUpdate() == PendingGeometryForced) - {} // maximum, nothing needed - else if (force == ForceGeometrySet) - setPendingGeometryUpdate(PendingGeometryForced); - else - setPendingGeometryUpdate(PendingGeometryNormal); - return; - } - doMove(x, y); - updateWindowRules(Rules::Position); - screens()->setCurrent(this); - workspace()->updateStackingOrder(); - const QRect oldFrameGeometry = frameGeometryBeforeUpdateBlocking(); - // client itself is not damaged - addRepaintDuringGeometryUpdates(); - updateGeometryBeforeUpdateBlocking(); - emit frameGeometryChanged(this, oldFrameGeometry); + setFrameGeometry(x, y, width(), height(), force); +} + +void AbstractClient::move(const QPoint &p, ForceGeometry_t force) +{ + setFrameGeometry(p.x(), p.y(), width(), height(), force); } bool AbstractClient::startMoveResize() @@ -1909,10 +1888,6 @@ m_frameGeometryBeforeUpdateBlocking = frameGeometry(); } -void AbstractClient::doMove(int, int) -{ -} - void AbstractClient::updateInitialMoveResizeGeometry() { m_moveResize.initialGeometry = frameGeometry(); diff --git a/internal_client.h b/internal_client.h --- a/internal_client.h +++ b/internal_client.h @@ -99,7 +99,6 @@ bool belongsToSameApplication(const AbstractClient *other, SameApplicationChecks checks) const override; void changeMaximize(bool horizontal, bool vertical, bool adjust) override; void destroyDecoration() override; - void doMove(int x, int y) override; void doResizeSync() override; void updateCaption() override; diff --git a/internal_client.cpp b/internal_client.cpp --- a/internal_client.cpp +++ b/internal_client.cpp @@ -552,14 +552,6 @@ setFrameGeometry(clientGeometry); } -void InternalClient::doMove(int x, int y) -{ - Q_UNUSED(x) - Q_UNUSED(y) - - syncGeometryToInternalWindow(); -} - void InternalClient::doResizeSync() { requestGeometry(moveResizeGeometry()); diff --git a/x11client.h b/x11client.h --- a/x11client.h +++ b/x11client.h @@ -182,8 +182,6 @@ void updateShape(); - using AbstractClient::move; - void move(int x, int y, ForceGeometry_t force = NormalGeometrySet) override; using AbstractClient::setFrameGeometry; void setFrameGeometry(int x, int y, int w, int h, ForceGeometry_t force = NormalGeometrySet) override; /// plainResize() simply resizes diff --git a/x11client.cpp b/x11client.cpp --- a/x11client.cpp +++ b/x11client.cpp @@ -2866,42 +2866,6 @@ addRepaintFull(); } -void X11Client::move(int x, int y, ForceGeometry_t force) -{ - const QPoint framePosition(x, y); - m_clientGeometry.moveTopLeft(framePosToClientPos(framePosition)); - const QPoint bufferPosition = isDecorated() ? framePosition : m_clientGeometry.topLeft(); - // resuming geometry updates is handled only in setGeometry() - Q_ASSERT(pendingGeometryUpdate() == PendingGeometryNone || areGeometryUpdatesBlocked()); - if (!areGeometryUpdatesBlocked() && framePosition != rules()->checkPosition(framePosition)) { - qCDebug(KWIN_CORE) << "forced position fail:" << framePosition << ":" << rules()->checkPosition(framePosition); - } - m_frameGeometry.moveTopLeft(framePosition); - if (force == NormalGeometrySet && m_bufferGeometry.topLeft() == bufferPosition) { - return; - } - m_bufferGeometry.moveTopLeft(bufferPosition); - if (areGeometryUpdatesBlocked()) { - if (pendingGeometryUpdate() == PendingGeometryForced) { - // Maximum, nothing needed. - } else if (force == ForceGeometrySet) { - setPendingGeometryUpdate(PendingGeometryForced); - } else { - setPendingGeometryUpdate(PendingGeometryNormal); - } - return; - } - updateServerGeometry(); - updateWindowRules(Rules::Position); - screens()->setCurrent(this); - workspace()->updateStackingOrder(); - // client itself is not damaged - const QRect oldFrameGeometry = frameGeometryBeforeUpdateBlocking(); - addRepaintDuringGeometryUpdates(); - updateGeometryBeforeUpdateBlocking(); - emit frameGeometryChanged(this, oldFrameGeometry); -} - bool X11Client::belongToSameApplication(const X11Client *c1, const X11Client *c2, SameApplicationChecks checks) { bool same_app = false; diff --git a/xdgshellclient.h b/xdgshellclient.h --- a/xdgshellclient.h +++ b/xdgshellclient.h @@ -140,7 +140,6 @@ bool acceptsFocus() const override; void doMinimize() override; void updateCaption() override; - void doMove(int x, int y) override; private Q_SLOTS: void handleConfigureAcknowledged(quint32 serial); diff --git a/xdgshellclient.cpp b/xdgshellclient.cpp --- a/xdgshellclient.cpp +++ b/xdgshellclient.cpp @@ -586,13 +586,6 @@ } } -void XdgShellClient::doMove(int x, int y) -{ - Q_UNUSED(x) - Q_UNUSED(y) - m_bufferGeometry = determineBufferGeometry(); -} - QByteArray XdgShellClient::windowRole() const { return QByteArray();