vcl/inc/listbox.hxx                |    1 +
 vcl/source/control/combobox.cxx    |    2 +-
 vcl/source/control/imp_listbox.cxx |    5 ++++-
 3 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 7de9417d5f65d35227c7f80f6d587c2a56bde4e0
Author:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
AuthorDate: Wed Nov 27 16:43:19 2019 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Thu Nov 28 11:20:23 2019 +0100

    tdf#129043 Correctly deliver combo box events when used with keyboard
    
    Change-Id: I82186f999e74be4aebd59d77666390a7d5e8ad81
    Reviewed-on: https://gerrit.libreoffice.org/83923
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx
index 1ee124423fc1..8faed20374e8 100644
--- a/vcl/inc/listbox.hxx
+++ b/vcl/inc/listbox.hxx
@@ -220,6 +220,7 @@ private:
     bool mbCenter : 1;           ///< center Text output
     bool mbRight : 1;            ///< right align Text output
     bool mbEdgeBlending : 1;
+    bool mbIsComboboxDropdown : 1;
 
     Link<ImplListBoxWindow*,void>  maScrollHdl;
     Link<LinkParamNone*,void>      maSelectHdl;
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index c96591bc2714..af661ee3a34a 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -749,7 +749,7 @@ bool ComboBox::EventNotify( NotifyEvent& rNEvt )
 
             case KEY_RETURN:
             {
-                if ((rNEvt.GetWindow() == m_pImpl->m_pSubEdit) && 
IsInDropDown())
+                if (rNEvt.GetWindow() == m_pImpl->m_pSubEdit)
                 {
                     m_pImpl->m_pImplLB->ProcessKeyInput( aKeyEvt );
                     bDone = true;
diff --git a/vcl/source/control/imp_listbox.cxx 
b/vcl/source/control/imp_listbox.cxx
index 9d9de05b93cd..3f053f466a0b 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -483,6 +483,7 @@ ImplListBoxWindow::ImplListBoxWindow( vcl::Window* pParent, 
WinBits nWinStyle )
     mbCenter            = ( nWinStyle & WB_CENTER );
     mbSimpleMode        = ( nWinStyle & WB_SIMPLEMODE );
     mbSort              = ( nWinStyle & WB_SORT );
+    mbIsComboboxDropdown = ( nWinStyle & WB_DROPDOWN );
     mbEdgeBlending      = false;
 
     // pb: #106948# explicit mirroring for calc
@@ -1637,7 +1638,9 @@ bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& 
rKEvt )
         mnCurrentPos = nSelect;
         if(SelectEntries( nSelect, eLET, bShift, bCtrl, bCurPosChange))
         {
-            mbTravelSelect = true;
+            // tdf#129043 Correctly deliver events when changing values with 
arrow keys in combobox
+            if (mbIsComboboxDropdown && IsReallyVisible())
+                mbTravelSelect = true;
             mnSelectModifier = rKEvt.GetKeyCode().GetModifier();
             ImplCallSelect();
             mbTravelSelect = false;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to