IsInPopupMode returns true when !mbInPopupMode
it returns mbPopupMode which is set to false on the next event cycle after the
one where mbIsInPopupMode is set to false
Change-Id: I66b0812cb9b9fc5cfe00c88f145f704bd1ecce2f
Reviewed-on: https://gerrit.libreoffice.org/70413
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index a13ee2e..0b5ad0a 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 b5e924a..050faa2 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