aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;