summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/inc/unx/gtk/gtkdata.hxx2
-rw-r--r--vcl/unx/gtk3/gtkdata.cxx6
2 files changed, 4 insertions, 4 deletions
diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index 39cb7907ae7f..3a1a9094d3ec 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -278,7 +278,7 @@ public:
class GtkSalData final : public GenericUnixSalData
{
GSource* m_pUserEvent;
- std::mutex m_aDispatchMutex;
+ osl::Mutex m_aDispatchMutex;
osl::Condition m_aDispatchCondition;
std::exception_ptr m_aException;
diff --git a/vcl/unx/gtk3/gtkdata.cxx b/vcl/unx/gtk3/gtkdata.cxx
index 1fb5c1edfe1f..cc8535ff2ad2 100644
--- a/vcl/unx/gtk3/gtkdata.cxx
+++ b/vcl/unx/gtk3/gtkdata.cxx
@@ -358,7 +358,7 @@ GtkSalData::~GtkSalData()
// up anyway before the condition they're waiting on gets destroyed.
m_aDispatchCondition.set();
- std::unique_lock g( m_aDispatchMutex );
+ osl::MutexGuard g( m_aDispatchMutex );
if (m_pUserEvent)
{
g_source_destroy (m_pUserEvent);
@@ -389,7 +389,7 @@ bool GtkSalData::Yield( bool bWait, bool bHandleAllCurrentEvents )
{
// release YieldMutex (and re-acquire at block end)
SolarMutexReleaser aReleaser;
- if( m_aDispatchMutex.try_lock() )
+ if( m_aDispatchMutex.tryToAcquire() )
bDispatchThread = true;
else if( ! bWait )
{
@@ -423,7 +423,7 @@ bool GtkSalData::Yield( bool bWait, bool bHandleAllCurrentEvents )
if( bDispatchThread )
{
- m_aDispatchMutex.unlock();
+ m_aDispatchMutex.release();
if( bWasEvent )
m_aDispatchCondition.set(); // trigger non dispatch thread yields
}