Browse Source

Merge pull request #334 from rsredsq/RED-ATOMIC-TOUCHSTATE

Small fix for issue with scrolling.
JoshEngebretson 10 years ago
parent
commit
0fdfd80624
1 changed files with 5 additions and 3 deletions
  1. 5 3
      Source/ThirdParty/TurboBadger/tb_widgets.cpp

+ 5 - 3
Source/ThirdParty/TurboBadger/tb_widgets.cpp

@@ -1424,13 +1424,15 @@ void TBWidget::InvokePointerMove(int x, int y, MODIFIER_KEYS modifierkeys, bool
     TBWidget* move = GetWidgetByTouchId(touchId);
     if (move && move->IsCaptured())
     {
-        move->ConvertFromRoot(x, y);
-        if (move->GetHitStatus(x, y)<=0)
+        int cx = x;
+        int cy = y;
+        move->ConvertFromRoot(cx, cy);
+        if (!move->GetHitStatus(cx, cy))
         {
             move->Invalidate();
             move->InvalidateSkinStates();
             move->OnCaptureChanged(false);
-            TBWidgetEvent ev_up(EVENT_TYPE_POINTER_UP, x, y, true, TB_MODIFIER_NONE);
+            TBWidgetEvent ev_up(EVENT_TYPE_POINTER_UP, cx, cy, touch, TB_MODIFIER_NONE);
             move->InvokeEvent(ev_up);
         }
     }