summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2020-10-05 16:38:15 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2020-10-06 13:32:33 +0200
commite1486b3d6658596e9dd27e712f5161553df08b1d (patch)
tree66f11dc440297c58a2a71d5dd511608df4539cac /vcl
parent49a1c4c649d062160765520f0a1c82925030a644 (diff)
Don't reuse tooltip window in different context
This causes interference to other views due to usage of global references in Online. Change-Id: Ib9346881d4e48ac1ce3456d386806582ade82255 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103994 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/app/help.cxx29
1 files changed, 14 insertions, 15 deletions
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index b5a7cb4cc057..b54213ed1501 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -498,21 +498,10 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHe
{
SAL_WARN_IF( pHelpWin == pParent, "vcl", "HelpInHelp ?!" );
- if ( ( rHelpText.isEmpty()
- || ( pHelpWin->GetWinStyle() != nHelpWinStyle )
- )
- && aHelpData.mbRequestingHelp
- )
- {
- // remove help window if no HelpText or
- // other help mode. but keep it if we are scrolling, ie not requesting help
- bool bWasVisible = pHelpWin->IsVisible();
- if ( bWasVisible )
- bNoDelay = true; // display it quickly if we were already in quick help mode
- pHelpWin = nullptr;
- ImplDestroyHelpWindow( bWasVisible );
- }
- else
+ bool bRemoveHelp = (rHelpText.isEmpty() || (pHelpWin->GetWinStyle() != nHelpWinStyle))
+ && aHelpData.mbRequestingHelp;
+
+ if (!bRemoveHelp && pHelpWin->GetParent() == pParent)
{
bool const bUpdate = (pHelpWin->GetHelpText() != rHelpText) ||
((pHelpWin->GetHelpArea() != rHelpArea) && aHelpData.mbRequestingHelp);
@@ -530,6 +519,16 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHe
pHelpWin->Invalidate();
}
}
+ else
+ {
+ // remove help window if no HelpText or
+ // other help mode. but keep it if we are scrolling, ie not requesting help
+ bool bWasVisible = pHelpWin->IsVisible();
+ if ( bWasVisible )
+ bNoDelay = true; // display it quickly if we were already in quick help mode
+ pHelpWin = nullptr;
+ ImplDestroyHelpWindow( bWasVisible );
+ }
}
if (pHelpWin || rHelpText.isEmpty())