[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - vcl/headless

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Tue Apr 30 08:31:11 UTC 2019


 vcl/headless/svpinst.cxx |   18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

New commits:
commit 0484c3a4d5b20d70209982265b9d44bd24b88aa9
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Sat Apr 27 22:23:03 2019 +0100
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Tue Apr 30 10:30:24 2019 +0200

    unipoll: do the legacy wakeup if not in unipoll mode.
    
    Change-Id: I7f5663f3316eb2bafcf13d07e2af69ae6f0637f5
    Reviewed-on: https://gerrit.libreoffice.org/71504
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 9b339bf72018..37cc0c9bda3c 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -367,9 +367,23 @@ sal_uInt32 SvpSalYieldMutex::doRelease(bool const bUnlockAll)
         // read m_nCount before doRelease
         bool const isReleased(bUnlockAll || m_nCount == 1);
         nCount = comphelper::GenericSolarMutex::doRelease( bUnlockAll );
-        if (isReleased && pInst)
-            pInst->Wakeup(SvpRequest::NONE);
+        if (isReleased)
+        {
+            ImplSVData* pSVData = ImplGetSVData();
+            if (pSVData->mpPollCallback) // is unipoll
+            {
+                if (pInst)
+                    pInst->Wakeup(SvpRequest::NONE);
+            }
+            else
+            {
+                std::unique_lock<std::mutex> g(m_WakeUpMainMutex);
+                m_wakeUpMain = true;
+                m_WakeUpMainCond.notify_one();
+            }
+        }
     }
+
     return nCount;
 }
 


More information about the Libreoffice-commits mailing list