[Libreoffice-commits] core.git: vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Apr 8 14:54:25 UTC 2019


 vcl/source/control/combobox.cxx |    4 +++-
 vcl/source/control/listbox.cxx  |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit ea3a1b075154a665d30aaac6513812ceb839f64b
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Apr 8 14:25:53 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Apr 8 16:54:04 2019 +0200

    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 at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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


More information about the Libreoffice-commits mailing list