|
|
@@ -1376,6 +1376,8 @@ void TBWidget::InvokePointerUp(int x, int y, MODIFIER_KEYS modifierkeys, bool to
|
|
|
//save x and y to restore it later
|
|
|
int ox = x;
|
|
|
int oy = y;
|
|
|
+ //true if pointer up event handled by captured_widget
|
|
|
+ bool handled = false;
|
|
|
//save old_capture for later check, because captured_widget can be nullptr after releasing capture
|
|
|
TBWidget *old_capture = captured_widget;
|
|
|
if (captured_widget && captured_widget->touchId_ == touchId)
|
|
|
@@ -1386,7 +1388,7 @@ void TBWidget::InvokePointerUp(int x, int y, MODIFIER_KEYS modifierkeys, bool to
|
|
|
captured_widget->InvokeEvent(ev_up);
|
|
|
if (!cancel_click && captured_widget->GetHitStatus(x, y))
|
|
|
{
|
|
|
- captured_widget->InvokeEvent(ev_click);
|
|
|
+ handled = captured_widget->InvokeEvent(ev_click);
|
|
|
}
|
|
|
captured_widget->ReleaseCapture();
|
|
|
}
|
|
|
@@ -1395,7 +1397,7 @@ void TBWidget::InvokePointerUp(int x, int y, MODIFIER_KEYS modifierkeys, bool to
|
|
|
y = oy;
|
|
|
TBWidget* down_widget = GetWidgetAt(x, y, true);
|
|
|
//make sure that down_widget is not captured_widget to don't sent event twice
|
|
|
- if (down_widget && down_widget->touchId_ == touchId && old_capture != down_widget)
|
|
|
+ if (down_widget && down_widget->touchId_ == touchId && old_capture != down_widget && !handled)
|
|
|
{
|
|
|
down_widget->ConvertFromRoot(x, y);
|
|
|
TBWidgetEvent ev_up(EVENT_TYPE_POINTER_UP, x, y, touch, modifierkeys);
|