aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Blake <oak99sky@yahoo.co.uk>2020-10-31 16:04:38 +0000
committerGitHub <noreply@github.com>2020-10-31 16:04:38 +0000
commitee37269e0a69a3c05ff03c1cc5dfef6c5a483f8f (patch)
treeed2e8495de0a66d27d837c1afabae919c981b66d
parentdd1e33fb5d4a8d0112fb84e8c309c58c359b55aa (diff)
parent04500db43c7d07a025eb91297281933458f72aec (diff)
Merge pull request #18683 from peak3d/guibase
[GUI] Fix GUIWrappedListContainer
-rw-r--r--xbmc/guilib/GUIBaseContainer.cpp5
-rw-r--r--xbmc/guilib/GUIBaseContainer.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/xbmc/guilib/GUIBaseContainer.cpp b/xbmc/guilib/GUIBaseContainer.cpp
index 863241240f..b5e3360d01 100644
--- a/xbmc/guilib/GUIBaseContainer.cpp
+++ b/xbmc/guilib/GUIBaseContainer.cpp
@@ -86,6 +86,9 @@ void CGUIBaseContainer::Process(unsigned int currentTime, CDirtyRegionList &dirt
// update our auto-scrolling as necessary
UpdateAutoScrolling(currentTime);
+ if (!m_waitForScrollEnd && !m_gestureActive)
+ ValidateOffset();
+
if (m_bInvalidated)
UpdateLayout();
@@ -735,6 +738,7 @@ EVENT_RESULT CGUIBaseContainer::OnMouseEvent(const CPoint &point, const CMouseEv
}
else if (event.m_id == ACTION_GESTURE_BEGIN)
{ // grab exclusive access
+ m_gestureActive = true;
CGUIMessage msg(GUI_MSG_EXCLUSIVE_MOUSE, GetID(), GetParentID());
SendWindowMessage(msg);
return EVENT_RESULT_HANDLED;
@@ -781,6 +785,7 @@ EVENT_RESULT CGUIBaseContainer::OnMouseEvent(const CPoint &point, const CMouseEv
SetCursor(GetCursor());
SetFocus(true);
m_waitForScrollEnd = false;
+ m_gestureActive = false;
return EVENT_RESULT_HANDLED;
}
return EVENT_RESULT_UNHANDLED;
diff --git a/xbmc/guilib/GUIBaseContainer.h b/xbmc/guilib/GUIBaseContainer.h
index b68f4edef7..c9850badfe 100644
--- a/xbmc/guilib/GUIBaseContainer.h
+++ b/xbmc/guilib/GUIBaseContainer.h
@@ -227,6 +227,8 @@ private:
float m_scrollItemsPerFrame;
static const int letter_match_timeout = 1000;
+ bool m_gestureActive = false;
+
// early inertial scroll cancellation
bool m_waitForScrollEnd = false;
float m_lastScrollValue = 0.0f;