vcl/source/window/dlgctrl.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit 7c7507e9319e65f7e9a16cbb66ffdea859403d19 Author: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> AuthorDate: Mon Jan 8 13:58:03 2024 +0100 Commit: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> CommitDate: Mon Jan 8 17:45:55 2024 +0100 tdf#157649 Allow omitting Alt key in Windows only Follow-up for ea1421747985bd09ad40565da8536e857b5c2e9a Change-Id: Ifdfeb8a0a9507f66af26607efc31438169452b46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161787 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index 90cdf353f8c0..ac75333d9011 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -952,9 +952,13 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput ) GetFocusFlags nGetFocusFlags = GetFocusFlags::Mnemonic; if ( pSWindow == ::ImplFindAccelWindow( this, i, c, nFormStart, nFormEnd ) ) nGetFocusFlags |= GetFocusFlags::UniqueMnemonic; +#ifdef _WIN32 // tdf#157649 Allow omitting the Alt key when focus is in the dialog action area: bool bIsButtonBox = dynamic_cast<VclButtonBox*>(pSWindow->GetParent()) != nullptr; if ((bIsButtonBox && pSWindow->GetParent()->HasChildPathFocus(true)) || aKeyCode.IsMod2()) +#else + if (aKeyCode.IsMod2()) +#endif { pSWindow->ImplControlFocus( nGetFocusFlags ); return true;