diff --git a/abstract_client.cpp b/abstract_client.cpp index 9fd3246305..e77c12c739 100644 --- a/abstract_client.cpp +++ b/abstract_client.cpp @@ -1063,6 +1063,7 @@ void AbstractClient::updateInitialMoveResizeGeometry() { m_moveResize.initialGeometry = geometry(); m_moveResize.geometry = m_moveResize.initialGeometry; + m_moveResize.startScreen = screen(); } void AbstractClient::updateCursor() diff --git a/abstract_client.h b/abstract_client.h index c492a04776..29199179a2 100644 --- a/abstract_client.h +++ b/abstract_client.h @@ -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; }; diff --git a/client.h b/client.h index cbffc7e591..4b8b245a02 100644 --- a/client.h +++ b/client.h @@ -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; diff --git a/geometry.cpp b/geometry.cpp index 5b1aa43629..bf8d7b5517 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -2658,7 +2658,6 @@ bool Client::startMoveResize() } s_haveResizeEffect = effects && static_cast(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();