Commit dc04cdef authored by Martin Flöser's avatar Martin Flöser

Move moveResizeStartScreen from Client to AbstractClient

Initialized in updateInitialMoveResizeGeometry().
parent dcb5e293
......@@ -1063,6 +1063,7 @@ void AbstractClient::updateInitialMoveResizeGeometry()
{
m_moveResize.initialGeometry = geometry();
m_moveResize.geometry = m_moveResize.initialGeometry;
m_moveResize.startScreen = screen();
}
void AbstractClient::updateCursor()
......
......@@ -685,6 +685,9 @@ protected:
void setMoveResizePointerButtonDown(bool down) {
m_moveResize.buttonDown = down;
}
int moveResizeStartScreen() const {
return m_moveResize.startScreen;
}
void checkUnrestrictedMoveResize();
/**
* Sets an appropriate cursor shape for the logical mouse position.
......@@ -747,6 +750,7 @@ private:
Position pointer = PositionCenter;
bool buttonDown = false;
Qt::CursorShape cursor = Qt::ArrowCursor;
int startScreen = 0;
} m_moveResize;
};
......
......@@ -610,7 +610,6 @@ private:
bool m_blockedActivityUpdatesRequireTransients;
Xcb::Window m_moveResizeGrabWindow;
bool move_resize_has_keyboard_grab;
int moveResizeStartScreen;
static bool s_haveResizeEffect;
bool m_managed;
......
......@@ -2658,7 +2658,6 @@ bool Client::startMoveResize()
}
s_haveResizeEffect = effects && static_cast<EffectsHandlerImpl*>(effects)->provides(Effect::Resize);
moveResizeStartScreen = screen();
updateInitialMoveResizeGeometry();
checkUnrestrictedMoveResize();
emit clientStartUserMovedResized(this);
......@@ -2688,7 +2687,7 @@ void Client::finishMoveResize(bool cancel)
setGeometry(moveResizeGeom);
}
checkScreen(); // needs to be done because clientFinishUserMovedResized has not yet re-activated online alignment
if (screen() != moveResizeStartScreen) {
if (screen() != moveResizeStartScreen()) {
workspace()->sendClientToScreen(this, screen()); // checks rule validity
if (maximizeMode() != MaximizeRestore)
checkWorkspacePosition();
......
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