summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-10-27 11:22:15 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-10-27 15:18:08 +0200
commitd0687e198342a09b944a06c5d9c707f43041bf78 (patch)
tree70407788adaee961dcd8a626964826624b1fb0d1 /svtools
parentef42ce579f0e4e4c436f70615f3adeb9f0f68217 (diff)
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 <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/valueset.cxx6
1 files changed, 3 insertions, 3 deletions
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);
}