From a15ccc2215b82634da7d0d08ce663d95c4c0024c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 3 Dec 2015 14:10:12 +0100 Subject: [PATCH] Move processDecorationMove from Client to AbstractClient --- abstract_client.cpp | 13 +++++++++++++ abstract_client.h | 1 + client.cpp | 13 ------------- client.h | 1 - 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/abstract_client.cpp b/abstract_client.cpp index 78d522532b..1f6a0228a7 100644 --- a/abstract_client.cpp +++ b/abstract_client.cpp @@ -1359,4 +1359,17 @@ void AbstractClient::layoutDecorationRects(QRect &left, QRect &top, QRect &right borderRight(), r.height() - top.height() - bottom.height()); } +void AbstractClient::processDecorationMove() +{ + if (isMoveResizePointerButtonDown()) { + return; + } + // TODO: handle modifiers + Position newmode = mousePosition(); + if (newmode != moveResizePointerMode()) { + setMoveResizePointerMode(newmode); + updateCursor(); + } +} + } diff --git a/abstract_client.h b/abstract_client.h index d542573bf7..2c7864a060 100644 --- a/abstract_client.h +++ b/abstract_client.h @@ -505,6 +505,7 @@ public: bool decorationHasAlpha() const; void triggerDecorationRepaint(); virtual void layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect &bottom) const; + void processDecorationMove(); // TODO: remove boolean trap static bool belongToSameApplication(const AbstractClient* c1, const AbstractClient* c2, bool active_hack = false); diff --git a/client.cpp b/client.cpp index 596971810a..6f6c03d97e 100644 --- a/client.cpp +++ b/client.cpp @@ -2175,19 +2175,6 @@ void Client::processDecorationButtonRelease(QMouseEvent *event) } } -void Client::processDecorationMove() -{ - if (isMoveResizePointerButtonDown()) { - return; - } - // TODO: handle modifiers - Position newmode = mousePosition(); - if (newmode != moveResizePointerMode()) { - setMoveResizePointerMode(newmode); - updateCursor(); - } -} - void Client::updateTabGroupStates(TabGroup::States states) { if (auto t = tabGroup()) { diff --git a/client.h b/client.h index 1788bdbdeb..c5a1dd4f21 100644 --- a/client.h +++ b/client.h @@ -164,7 +164,6 @@ public: NET::WindowType windowType(bool direct = false, int supported_types = 0) const; bool processDecorationButtonPress(QMouseEvent *event); void processDecorationButtonRelease(QMouseEvent *event); - void processDecorationMove(); bool manage(xcb_window_t w, bool isMapped); void releaseWindow(bool on_shutdown = false);