vcl/unx/gtk3/gtkinst.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d9f3a656c40e47d23a1c6de427bcdc7511d5249a
Author:     Jim Raykowski <rayk...@gmail.com>
AuthorDate: Sun Mar 20 19:25:12 2022 -0800
Commit:     Jim Raykowski <rayk...@gmail.com>
CommitDate: Thu Mar 24 17:54:10 2022 +0100

    fix gtk3 combobox up arrow and page up does not select first entry
    
    when popup is not active
    
    Change-Id: I0c4c0841bf0b24cc528d428829ec628e47032fb4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131882
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Jim Raykowski <rayk...@gmail.com>

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 117c5c88a788..b738160118f2 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -20363,7 +20363,7 @@ private:
                 sal_uInt16 nKeyMod = aKeyCode.GetModifier();
                 if (!nKeyMod)
                 {
-                    int nStartBound = m_bPopupActive ? 0 : (m_nMRUCount + 1);
+                    int nStartBound = m_bPopupActive || !m_nMRUCount ? 0 : 
(m_nMRUCount + 1);
                     int nActive = get_active_including_mru() - 1;
                     while (nActive >= nStartBound && 
separator_function(nActive))
                         --nActive;
@@ -20379,7 +20379,7 @@ private:
                 if (!nKeyMod)
                 {
                     int nCount = get_count_including_mru();
-                    int nStartBound = m_bPopupActive ? 0 : (m_nMRUCount + 1);
+                    int nStartBound = m_bPopupActive || !m_nMaxMRUCount ? 0 : 
(m_nMRUCount + 1);
                     int nActive = nStartBound;
                     while (nActive < nCount && separator_function(nActive))
                         ++nActive;

Reply via email to