summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/window/dockmgr.cxx36
1 files changed, 17 insertions, 19 deletions
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index eb27e3e18c05..9846bc45549b 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -42,8 +42,8 @@ class ImplDockFloatWin2 : public FloatingWindow
private:
ImplDockingWindowWrapper* mpDockWin;
sal_uInt64 mnLastTicks;
- Idle maDockIdle;
- Idle maEndDockIdle;
+ Timer m_aDockTimer;
+ Timer m_aEndDockTimer;
Point maDockPos;
tools::Rectangle maDockRect;
bool mbInMove;
@@ -86,13 +86,15 @@ ImplDockFloatWin2::ImplDockFloatWin2( vcl::Window* pParent, WinBits nWinBits,
SetBackground( GetSettings().GetStyleSettings().GetFaceColor() );
- maDockIdle.SetInvokeHandler( LINK( this, ImplDockFloatWin2, DockTimerHdl ) );
- maDockIdle.SetPriority( TaskPriority::HIGH_IDLE );
- maDockIdle.SetDebugName( "vcl::ImplDockFloatWin2 maDockIdle" );
+ m_aDockTimer.SetInvokeHandler( LINK( this, ImplDockFloatWin2, DockTimerHdl ) );
+ m_aDockTimer.SetPriority( TaskPriority::HIGH_IDLE );
+ m_aDockTimer.SetTimeout( 50 );
+ m_aDockTimer.SetDebugName( "vcl::ImplDockFloatWin2 m_aDockTimer" );
- maEndDockIdle.SetInvokeHandler( LINK( this, ImplDockFloatWin2, EndDockTimerHdl ) );
- maEndDockIdle.SetPriority( TaskPriority::HIGH_IDLE );
- maEndDockIdle.SetDebugName( "vcl::ImplDockFloatWin2 maEndDockIdle" );
+ m_aEndDockTimer.SetInvokeHandler( LINK( this, ImplDockFloatWin2, EndDockTimerHdl ) );
+ m_aEndDockTimer.SetPriority( TaskPriority::HIGH_IDLE );
+ m_aEndDockTimer.SetTimeout( 50 );
+ m_aEndDockTimer.SetDebugName( "vcl::ImplDockFloatWin2 m_aEndDockTimer" );
}
ImplDockFloatWin2::~ImplDockFloatWin2()
@@ -111,7 +113,6 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockTimerHdl, Timer *, void)
{
SAL_WARN_IF( !mpDockWin->IsFloatingMode(), "vcl", "docktimer called but not floating" );
- maDockIdle.Stop();
PointerState aState = GetPointerState();
if( aState.mnState & KEY_MOD1 )
@@ -119,7 +120,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockTimerHdl, Timer *, void)
// i43499 CTRL disables docking now
mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->HideTracking();
if( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) )
- maDockIdle.Start();
+ m_aDockTimer.Start();
}
else if( ! ( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) )
{
@@ -129,7 +130,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockTimerHdl, Timer *, void)
else
{
mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, ShowTrackFlags::Big | ShowTrackFlags::TrackWindow );
- maDockIdle.Start();
+ m_aDockTimer.Start();
}
}
@@ -137,7 +138,6 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, EndDockTimerHdl, Timer *, void)
{
SAL_WARN_IF( !mpDockWin->IsFloatingMode(), "vcl", "enddocktimer called but not floating" );
- maEndDockIdle.Stop();
PointerState aState = GetPointerState();
if( ! ( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) )
{
@@ -145,9 +145,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, EndDockTimerHdl, Timer *, void)
mpDockWin->EndDocking( maDockRect, true );
}
else
- {
- maEndDockIdle.Start();
- }
+ m_aEndDockTimer.Start();
}
IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl, void*, void)
@@ -204,14 +202,14 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl, void*, void)
maDockRect.SetPos( mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ScreenToOutputPixel(
maDockRect.TopLeft() ) );
mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, ShowTrackFlags::Big | ShowTrackFlags::TrackWindow );
- maEndDockIdle.Stop();
- DockTimerHdl( nullptr );
+ m_aEndDockTimer.Stop();
+ m_aDockTimer.Invoke();
}
else
{
mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->HideTracking();
- maDockIdle.Stop();
- EndDockTimerHdl( nullptr );
+ m_aDockTimer.Stop();
+ m_aEndDockTimer.Invoke();
}
}
mbInMove = false;