vcl/source/app/salvtables.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 62e1cacb90ad7f2531dbd18e1c5f5cff7cbec7ab
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Mon Jan 24 14:16:31 2022 +0100
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Mon Jan 24 14:44:51 2022 +0100

    lok: use focused tab page help
    
    When we open dialog with tab pages, help should open
    website for corresponding tab.
    
    Use focused window - but not global which can be modified
    by other view in lok case.
    
    followup for:
    commit 70f2fc7a10f41204e353bd3487377983a1018b53
    lok: don't use focus window to request help
    
    Change-Id: Ib7544a91696ce2f2c8ab01e62a47d279d2c5c655
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128863
    Reviewed-by: Mert Tumer <mert.tu...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index d1345a8af5b7..8ed59e9f3e6e 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -6995,8 +6995,10 @@ void SalInstanceWindow::help()
 {
     //show help for widget with keyboard focus
     vcl::Window* pWidget = ImplGetSVData()->mpWinData->mpFocusWin;
-    if (!pWidget || comphelper::LibreOfficeKit::isActive())
+    if (!pWidget)
         pWidget = m_xWindow;
+    if (comphelper::LibreOfficeKit::isActive() && 
m_xWindow->GetFocusedWindow())
+        pWidget = m_xWindow->GetFocusedWindow();
     OString sHelpId = pWidget->GetHelpId();
     while (sHelpId.isEmpty())
     {

Reply via email to