diff options
author | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2024-01-08 13:58:03 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2024-01-08 17:45:55 +0100 |
commit | 7c7507e9319e65f7e9a16cbb66ffdea859403d19 (patch) | |
tree | 706d9a796f86dd9a45815de1689eaeb7f393c3de /vcl | |
parent | aaefd2080ecb39a3deade23368a83acee91367ef (diff) |
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.mehrbrodt@allotropia.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/dlgctrl.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
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; |