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

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 29 08:51:14 UTC 2021


 vcl/source/app/salvtables.cxx |    3 ++-
 vcl/source/control/button.cxx |    2 +-
 vcl/source/window/dialog.cxx  |    2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 07c19a0c04305ce28612f45aef293f3f538b5535
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Dec 17 14:44:51 2020 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Apr 29 10:50:41 2021 +0200

    lok: don't use focus window to request help
    
    Use clicked button instead - what leads to the correct window.
    If only focused window was taken into account sometimes
    it caused incorrect help link to be used.
    
    Change-Id: I645dc1ffa6a6d6d363ea5f9874fa830c441516c7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107882
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    (cherry picked from commit 70f2fc7a10f41204e353bd3487377983a1018b53)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114728
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index c47d46422b53..2b8474f5c0cf 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -53,6 +53,7 @@
 #include <vcl/weld.hxx>
 #include <bitmaps.hlst>
 #include <vcl/salvtables.hxx>
+#include <comphelper/lok.hxx>
 
 SalFrame::SalFrame()
     : m_pWindow(nullptr)
@@ -3484,7 +3485,7 @@ void SalInstanceWindow::help()
 {
     //show help for widget with keyboard focus
     vcl::Window* pWidget = ImplGetSVData()->mpWinData->mpFocusWin;
-    if (!pWidget)
+    if (!pWidget || comphelper::LibreOfficeKit::isActive())
         pWidget = m_xWindow;
     OString sHelpId = pWidget->GetHelpId();
     while (sHelpId.isEmpty())
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 845c397b0eef..d9ce10ae4549 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1846,7 +1846,7 @@ void HelpButton::Click()
     if ( !GetClickHdl() )
     {
         vcl::Window* pFocusWin = Application::GetFocusWindow();
-        if ( !pFocusWin )
+        if ( !pFocusWin || comphelper::LibreOfficeKit::isActive() )
             pFocusWin = this;
 
         HelpEvent aEvt( pFocusWin->GetPointerPosPixel(), HelpEventMode::CONTEXT );
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 209179cc9591..db183d7ca1d9 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1421,7 +1421,7 @@ IMPL_LINK(Dialog, ResponseHdl, Button*, pButton, void)
     if (nResponse == RET_HELP)
     {
         vcl::Window* pFocusWin = Application::GetFocusWindow();
-        if (!pFocusWin)
+        if (!pFocusWin || comphelper::LibreOfficeKit::isActive())
             pFocusWin = pButton;
         HelpEvent aEvt(pFocusWin->GetPointerPosPixel(), HelpEventMode::CONTEXT);
         pFocusWin->RequestHelp(aEvt);


More information about the Libreoffice-commits mailing list