vcl/source/window/dockmgr.cxx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
New commits: commit 2c11a18897225a89df99869c702c0cd91ed9e11b Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Tue Aug 1 09:44:56 2023 +0200 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Wed Aug 2 12:50:36 2023 +0200 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.mcnam...@collabora.com> Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> (cherry picked from commit f4cbcdecbe4ff6d993db65c33d9f0317328a60b1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155147 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() ) {