Move moveResizeStartScreen from Client to AbstractClient
Initialized in updateInitialMoveResizeGeometry().
This commit is contained in:
parent
dcb5e29316
commit
dc04cdef64
4 changed files with 6 additions and 3 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
1
client.h
1
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;
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue