diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2016-10-08 22:10:32 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2016-10-09 00:32:33 +0300 |
commit | 3e4e5717d470f4bdb3477da6a979184b363a07e5 (patch) | |
tree | 3cd0fb6583ede1b07c7cc263f7746ad7cfaf54a2 /vcl | |
parent | 9ffd74a37670f7c102595a460fb2c425eb58da62 (diff) |
Just get the last window pos
Change-Id: I1cf0964d11e9045366697b75c2606df6f62aa438
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/dockmgr.cxx | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index 984e5af8332e..fcddef31a485 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -462,7 +462,6 @@ private: bool mbMoving; bool mbTrackingEnabled; Point maDelta; - Point maTearOffPosition; bool mbGripAtBottom; bool mbHasGrip; void ImplSetBorder(); @@ -482,7 +481,6 @@ public: Rectangle GetDragRect() const; Point GetToolboxPosition() const; - Point GetTearOffPosition() const; void DrawGrip(vcl::RenderContext& rRenderContext); void DrawBorder(vcl::RenderContext& rRenderContext); @@ -570,13 +568,6 @@ Point ImplPopupFloatWin::GetToolboxPosition() const return aPt; } -Point ImplPopupFloatWin::GetTearOffPosition() const -{ - Point aPt( maTearOffPosition ); - //aPt += GetToolboxPosition(); // remove 'decoration' - return aPt; -} - void ImplPopupFloatWin::DrawBorder(vcl::RenderContext& rRenderContext) { rRenderContext.SetFillColor(); @@ -741,8 +732,7 @@ void ImplPopupFloatWin::MouseButtonDown( const MouseEvent& rMEvt ) PointerState aState = GetParent()->GetPointerState(); if (HasMirroredGraphics() && IsRTLEnabled()) ImplMirrorFramePos(aState.maPos); - maTearOffPosition = GetWindow( GetWindowType::Border )->GetPosPixel(); - maDelta = aState.maPos - maTearOffPosition; + maDelta = aState.maPos - GetWindow( GetWindowType::Border )->GetPosPixel(); mbTrackingEnabled = true; } else @@ -767,8 +757,7 @@ void ImplPopupFloatWin::Tracking( const TrackingEvent& rTEvt ) const OutputDevice *pOutDev = GetOutDev(); if (pOutDev->HasMirroredGraphics() && IsRTLEnabled()) ImplMirrorFramePos(aState.maPos); - maTearOffPosition = aState.maPos - maDelta; - GetWindow( GetWindowType::Border )->SetPosPixel( maTearOffPosition ); + GetWindow( GetWindowType::Border )->SetPosPixel( aState.maPos - maDelta ); } } } @@ -1136,8 +1125,7 @@ IMPL_LINK_NOARG(ImplDockingWindowWrapper, PopupModeEnd, FloatingWindow*, void) GetWindow()->Show( false, ShowFlags::NoFocusChange ); // set parameter for handler before destroying floating window - ImplPopupFloatWin *pPopupFloatWin = static_cast<ImplPopupFloatWin*>(mpFloatWin.get()); - EndPopupModeData aData( pPopupFloatWin->GetTearOffPosition(), mpFloatWin->IsPopupModeTearOff() ); + EndPopupModeData aData( mpFloatWin->GetWindow( GetWindowType::Border )->GetPosPixel(), mpFloatWin->IsPopupModeTearOff() ); // before deleting change parent back, so we can delete the floating window alone vcl::Window* pRealParent = GetWindow()->GetWindow( GetWindowType::Parent ); |