summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-08-01 09:44:56 +0200
committerAndras Timar <andras.timar@collabora.com>2023-08-02 17:47:53 +0200
commit32e03fd181a6852f00d464c9982e131726789a30 (patch)
tree260f1472110be8cb250059a619c782b03650a5c7
parent00ac71208cd65dc7232a7a92e7f475685ea7dfe6 (diff)
tdf#156100 tdf#156561 Revert to previous behavior for gtk popups
In order to fix announcement of items in the popups with at least NVDA on Windows, commit dc0706cabfe39ddb6ea23d60ccfb756f2b9e6efb Date: Wed Mar 15 17:00:27 2023 +0100 tdf#140762 tdf#152671 Make dock win visible before showing popup made sure that the dock window is made visible before the popup is shown. That's problematic for the gtk implementations, though. On issue was addressed with commit 70642bb7afd2cee6f7ae6eff2936a35978bd0597 Date: Thu Apr 6 15:07:15 2023 +0100 tdf#154470 try moving the Show of the client to after the float positioning , but there's still an issue for the RTL case (tdf#156100). To unbreak that while leaving the announcement with NVDA working properly, effectively revert to the original behavior for the gtk VCL plugins (which have their own implementation for popup handling) for now. Further analysis of the root causes is planned in the context of tdf#156561, so hopefully the code paths can be unified again in the future. (One issue is addressed by Change-Id I62ab32342ef67c770ced9f0d2be867dc9355bd4a, "tdf#156561 wina11y: Handle CHILD event", but that's not enough by itself.) Change-Id: Ie67bded6c380695866d5343dab9d3f563ada057a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155125 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> (cherry picked from commit 3bb762c53ea79f8915a1b8fa39f3f5f57aa68c84) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155148
-rw-r--r--vcl/source/window/dockmgr.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index d64f7cd8f208..87ca621f7f28 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -821,7 +821,21 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin
if( pParentToolBox->IsKeyEvent() )
nFlags |= FloatWinPopupFlags::GrabFocus;
- mpFloatWin->StartPopupMode( pParentToolBox, nFlags | FloatWinPopupFlags::MakeClientWindowVisibleBeforePopup);
+ // tdf#140762, tdf#152671, tdf#154470, tdf#156100: Without client window being visible
+ // before showing popup, at least NVDA on Windows does not announce items in the popup,
+ // so make the client window visible first. This is problematic for gtk VCL plugins though,
+ // so don't do it there and use different code paths for now.
+ // For further analysis of the root causes, there's tdf#156561.
+ const OUString sToolkit = Application::GetToolkitName();
+ if (sToolkit == "gtk3" || sToolkit == "gtk4")
+ {
+ mpFloatWin->StartPopupMode( pParentToolBox, nFlags);
+ GetWindow()->Show();
+ }
+ else
+ {
+ mpFloatWin->StartPopupMode( pParentToolBox, nFlags | FloatWinPopupFlags::MakeClientWindowVisibleBeforePopup);
+ }
if( pParentToolBox->IsKeyEvent() )
{