include/svtools/valueset.hxx        |    2 +-
 svtools/source/control/valueset.cxx |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit d0687e198342a09b944a06c5d9c707f43041bf78
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Oct 27 11:22:15 2021 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed Oct 27 15:18:08 2021 +0200

    if the mouse move is a leave event ignore the crossing position
    
    and just consider it as "mouse out of window"
    
    Change-Id: I1910804a94608952de6f646560a3104d62b5a67b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124265
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx
index ffaa49a29b7f..f7b30a83c2f8 100644
--- a/include/svtools/valueset.hxx
+++ b/include/svtools/valueset.hxx
@@ -244,7 +244,7 @@ private:
     SVT_DLLPRIVATE tools::Rectangle    ImplGetItemRect( size_t nPos ) const;
     SVT_DLLPRIVATE void         ImplFireAccessibleEvent( short nEventId, const 
css::uno::Any& rOldValue, const css::uno::Any& rNewValue );
     SVT_DLLPRIVATE bool         ImplHasAccessibleListeners() const;
-    SVT_DLLPRIVATE void         ImplTracking(const Point& rPos);
+    SVT_DLLPRIVATE void         ImplTracking(bool bLeaveWindow, const Point& 
rPos);
     SVT_DLLPRIVATE void         QueueReformat();
     SVT_DLLPRIVATE void         SetFirstLine(sal_uInt16 nNewFirstLine); // set 
mnFirstLine and update scrollbar to match
     SVT_DLLPRIVATE void         RecalcScrollBar();
diff --git a/svtools/source/control/valueset.cxx 
b/svtools/source/control/valueset.cxx
index 67378218fa3d..a5c1b21e47e9 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -457,9 +457,9 @@ bool ValueSet::KeyInput( const KeyEvent& rKeyEvent )
     return true;
 }
 
-void ValueSet::ImplTracking(const Point& rPos)
+void ValueSet::ImplTracking(bool bLeaveWindow, const Point& rPos)
 {
-    ValueSetItem* pItem = ImplGetItem( ImplGetItem( rPos ) );
+    ValueSetItem* pItem = bLeaveWindow ? nullptr : 
ImplGetItem(ImplGetItem(rPos));
     if ( pItem )
     {
         if( GetStyle() & WB_MENUSTYLEVALUESET || GetStyle() & WB_FLATVALUESET )
@@ -517,7 +517,7 @@ bool ValueSet::MouseMove(const MouseEvent& rMouseEvent)
 {
     // because of SelectionMode
     if ((GetStyle() & WB_MENUSTYLEVALUESET) || (GetStyle() & WB_FLATVALUESET))
-        ImplTracking(rMouseEvent.GetPosPixel());
+        ImplTracking(rMouseEvent.IsLeaveWindow(), rMouseEvent.GetPosPixel());
     return CustomWidgetController::MouseMove(rMouseEvent);
 }
 

Reply via email to