Move processDecorationMove from Client to AbstractClient

This commit is contained in:
Martin Gräßlin 2015-12-03 14:10:12 +01:00
parent 4d61835988
commit a15ccc2215
4 changed files with 14 additions and 14 deletions

View file

@ -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();
}
}
}

View file

@ -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);

View file

@ -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()) {

View file

@ -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);