summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2011-09-30 18:00:13 +0100
committerMichael Meeks <michael.meeks@suse.com>2011-10-25 13:41:50 +0100
commit9b51808742ae4236b582b2693578e8db8e126a13 (patch)
tree4816bd516baf5886ea8f444ef99b45a753724c9c /vcl/unx/gtk
parent10517629101642f18a4ae3ed3f8110dcccf963b9 (diff)
move SalYieldMutexReleaser into a more sensible place
Diffstat (limited to 'vcl/unx/gtk')
-rw-r--r--vcl/unx/gtk/app/gtkdata.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index 599d9dae3e51..c1ff485b00b3 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -563,15 +563,19 @@ GtkData::~GtkData()
Yield( true, true );
g_warning ("TESTME: We used to have a stop-timer here, but the central code should do this");
+ // sanity check: at this point nobody should be yielding, but wake them
+ // up anyway before the condition they're waiting on gets destroyed.
+ osl_setCondition( m_aDispatchCondition );
+
+ osl_acquireMutex( m_aDispatchMutex );
if (m_pUserEvent)
{
g_source_destroy (m_pUserEvent);
g_source_unref (m_pUserEvent);
+ m_pUserEvent = NULL;
}
- // sanity check: at this point nobody should be yielding, but wake them
- // up anyway before the condition they're waiting on gets destroyed.
- osl_setCondition( m_aDispatchCondition );
osl_destroyCondition( m_aDispatchCondition );
+ osl_releaseMutex( m_aDispatchMutex );
osl_destroyMutex( m_aDispatchMutex );
}
@@ -586,7 +590,7 @@ void GtkData::Yield( bool bWait, bool bHandleAllCurrentEvents )
bool bWasEvent = false;
{
// release YieldMutex (and re-acquire at block end)
- YieldMutexReleaser aReleaser;
+ SalYieldMutexReleaser aReleaser;
if( osl_tryToAcquireMutex( m_aDispatchMutex ) )
bDispatchThread = true;
else if( ! bWait )