diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-08-15 07:52:12 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-08-22 10:51:35 +0200 |
commit | e485703d3e5eaabe5f1bfd900a3ff205a8a84a35 (patch) | |
tree | 5f46cf423504446ca22a7a9759dd7fd952ee661e | |
parent | 168782a6e48fad98355a72e557402e66f7aa075d (diff) |
Really run the layouter every 50ms
By Start()-ing the Idle, it's always reset, so with fast
resizes you could actually postpone layouting indefinitly.
Change-Id: Ie90b6f3f378ee8d163f621fce51280e09c826f14
-rw-r--r-- | framework/source/layoutmanager/layoutmanager.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 373b2c73e159..a8dca9cc3fce 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -2199,9 +2199,9 @@ void SAL_CALL LayoutManager::unlock() // conform to documentation: unlock with lock count == 0 means force a layout SolarMutexClearableGuard aWriteLock; - if ( bDoLayout ) - m_aAsyncLayoutTimer.Stop(); - aWriteLock.clear(); + if ( bDoLayout ) + m_aAsyncLayoutTimer.Stop(); + aWriteLock.clear(); Any a( nLockCount ); implts_notifyListeners( frame::LayoutManagerEvents::UNLOCK, a ); @@ -2598,9 +2598,9 @@ void SAL_CALL LayoutManager::windowResized( const awt::WindowEvent& aEvent ) if ( !m_aAsyncLayoutTimer.IsActive() ) { m_aAsyncLayoutTimer.Invoke(); + if ( m_nLockCount == 0 ) + m_aAsyncLayoutTimer.Start(); } - if ( m_nLockCount == 0 ) - m_aAsyncLayoutTimer.Start(); } else if ( m_xFrame.is() && aEvent.Source == m_xFrame->getContainerWindow() ) { @@ -2670,7 +2670,6 @@ void SAL_CALL LayoutManager::windowHidden( const lang::EventObject& aEvent ) IMPL_LINK_NOARG(LayoutManager, AsyncLayoutHdl, Timer *, void) { SolarMutexClearableGuard aReadLock; - m_aAsyncLayoutTimer.Stop(); if( !m_xContainerWindow.is() ) return; |