diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2016-09-08 06:55:30 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-07-13 12:10:21 +0200 |
commit | d348035a60361a1b9ba9eb7b67013204a24a6633 (patch) | |
tree | 85e7e4ff2dd926ef9d2907b4f4900815bdbb96c5 /vcl/unx/gtk3 | |
parent | 1782893282a4543e946e6b2c8de863b10fab0c85 (diff) |
Drop special idle handling
Idles are just instant timers, which should most time have a low
priority, By dropping most special idle handling we'll just
schedule by priority.
This also reverts SalYieldResult back to a bool, which just
indicates if any event was processed.
Change-Id: Ia0b91b06dffb77af066f01838d8f9483523bf67d
Diffstat (limited to 'vcl/unx/gtk3')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkdata.cxx | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkdata.cxx b/vcl/unx/gtk3/gtk3gtkdata.cxx index 47235ebcbb02..3e074489bfd5 100644 --- a/vcl/unx/gtk3/gtk3gtkdata.cxx +++ b/vcl/unx/gtk3/gtk3gtkdata.cxx @@ -388,7 +388,6 @@ GtkData::GtkData( SalInstance *pInstance ) : SalGenericData( SAL_DATA_GTK3, pInstance ) , m_aDispatchMutex() , m_aDispatchCondition() - , blockIdleTimeout( false ) { m_pUserEvent = nullptr; } @@ -437,10 +436,8 @@ void GtkData::Dispose() } /// Allows events to be processed, returns true if we processed an event. -SalYieldResult GtkData::Yield( bool bWait, bool bHandleAllCurrentEvents ) +bool GtkData::Yield( bool bWait, bool bHandleAllCurrentEvents ) { - blockIdleTimeout = !bWait; - /* #i33212# only enter g_main_context_iteration in one thread at any one * time, else one of them potentially will never end as long as there is * another thread in there. Having only one yielding thread actually dispatch @@ -455,8 +452,7 @@ SalYieldResult GtkData::Yield( bool bWait, bool bHandleAllCurrentEvents ) bDispatchThread = true; else if( ! bWait ) { - blockIdleTimeout = false; - return SalYieldResult::TIMEOUT; // someone else is waiting already, return + return false; // someone else is waiting already, return } if( bDispatchThread ) @@ -490,10 +486,8 @@ SalYieldResult GtkData::Yield( bool bWait, bool bHandleAllCurrentEvents ) if( bWasEvent ) m_aDispatchCondition.set(); // trigger non dispatch thread yields } - blockIdleTimeout = false; - return bWasEvent ? SalYieldResult::EVENT - : SalYieldResult::TIMEOUT; + return bWasEvent; } void GtkData::Init() @@ -698,11 +692,7 @@ extern "C" { ImplSVData* pSVData = ImplGetSVData(); if( pSVData->maSchedCtx.mpSalTimer ) - { - // TODO: context_pending should be probably checked too, but it causes locking assertion failures - bool idle = !pSalData->BlockIdleTimeout() && /*!g_main_context_pending( NULL ) &&*/ !gdk_events_pending(); - pSVData->maSchedCtx.mpSalTimer->CallCallback( idle ); - } + pSVData->maSchedCtx.mpSalTimer->CallCallback(); return TRUE; } |