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

New commits:
commit 2ed8f9b6bc820c68dfae1267bc87429d502625b1
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: Fri Feb 4 15:40:08 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>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129167
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index bf67487901e9..ec8f27366a19 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -7182,8 +7182,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().get();
     OString sHelpId = pWidget->GetHelpId();
     while (sHelpId.isEmpty())
     {

Reply via email to