vcl/source/app/salvtables.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit 8f0a2c52f60f2d11bf4a1f8df246f651ce01360e Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Mon Nov 25 16:49:52 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Mon Nov 25 20:26:33 2024 +0100 Resolves: tdf#163777 Ignore pageup and down when modifier held... in a SalInstanceEntryTreeView, otherwise the ctrl+pageup/down gets processed twice by the toplevel notebook due to the forwarding used here. Change-Id: Ic5003064ddba44f940fb4c4a727d8081c3644361 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177277 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index bf562ce7c687..32a613a32dd0 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -6961,9 +6961,12 @@ IMPL_LINK(SalInstanceEntryTreeView, KeyPressListener, VclWindowEvent&, rEvent, v if (rEvent.GetId() != VclEventId::WindowKeyInput) return; const KeyEvent& rKeyEvent = *static_cast<KeyEvent*>(rEvent.GetData()); + if (rKeyEvent.GetKeyCode().GetModifier()) // tdf#163777 ignore when modifier held + return; sal_uInt16 nKeyCode = rKeyEvent.GetKeyCode().GetCode(); - if (!(nKeyCode == KEY_UP || nKeyCode == KEY_DOWN || nKeyCode == KEY_PAGEUP - || nKeyCode == KEY_PAGEDOWN)) + const bool bNavigation = nKeyCode == KEY_UP || nKeyCode == KEY_DOWN || nKeyCode == KEY_PAGEUP + || nKeyCode == KEY_PAGEDOWN; + if (!bNavigation) return; m_pTreeView->disable_notify_events();