Kaydet (Commit) 2eb36dc4 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Hack to not leave SolarMutex released after g_main_loop_run call

Change-Id: I26923469d08308233ce3fabe749806c16d75cecd
üst ff0bd9ff
......@@ -21,6 +21,7 @@ $(eval $(call gb_Library_use_libraries,ucpgio1,\
sal \
salhelper \
ucbhelper \
vcl \
))
$(eval $(call gb_Library_use_externals,ucpgio1,\
......
......@@ -62,6 +62,7 @@
#include <ucbhelper/propertyvalueset.hxx>
#include <ucbhelper/interactionrequest.hxx>
#include <ucbhelper/cancelcommandexecution.hxx>
#include <vcl/svapp.hxx>
#include <osl/conditn.hxx>
......@@ -325,7 +326,15 @@ void MountOperation::Completed(GObject *source, GAsyncResult *res, gpointer user
GError *MountOperation::Mount(GFile *pFile)
{
g_file_mount_enclosing_volume(pFile, G_MOUNT_MOUNT_NONE, mpAuthentication, NULL, MountOperation::Completed, this);
{
//HACK: At least the gdk_threads_set_lock_functions(GdkThreadsEnter,
// GdkThreadsLeave) call in vcl/unx/gtk/app/gtkinst.cxx will lead to
// GdkThreadsLeave unlock the SolarMutex down to zero at the end of
// g_main_loop_run, so we need ~SolarMutexReleaser to raise it back to
// the original value again:
SolarMutexReleaser rel;
g_main_loop_run(mpLoop);
}
return mpError;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment