diff options
-rw-r--r-- | vcl/source/control/combobox.cxx | 4 | ||||
-rw-r--r-- | vcl/source/control/listbox.cxx | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index a13ee2e4b2b7..0b5ad0ad624a 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -983,7 +983,9 @@ bool ComboBox::IsTravelSelect() const bool ComboBox::IsInDropDown() const { - return m_pImpl->m_pFloatWin && m_pImpl->m_pFloatWin->IsInPopupMode(); + // when the dropdown is dismissed, first mbInPopupMode is set to false, and on the next event iteration then + // mbPopupMode is set to false + return m_pImpl->m_pFloatWin && m_pImpl->m_pFloatWin->IsInPopupMode() && m_pImpl->m_pFloatWin->ImplIsInPrivatePopupMode(); } void ComboBox::EnableMultiSelection( bool bMulti ) diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx index b5e924a52b5f..050faa2d13d8 100644 --- a/vcl/source/control/listbox.cxx +++ b/vcl/source/control/listbox.cxx @@ -1120,7 +1120,9 @@ bool ListBox::IsTravelSelect() const bool ListBox::IsInDropDown() const { - return mpFloatWin && mpFloatWin->IsInPopupMode(); + // when the dropdown is dismissed, first mbInPopupMode is set to false, and on the next event iteration then + // mbPopupMode is set to false + return mpFloatWin && mpFloatWin->IsInPopupMode() && mpFloatWin->ImplIsInPrivatePopupMode(); } tools::Rectangle ListBox::GetBoundingRectangle( sal_Int32 nItem ) const |