add click count to click event too.

This commit is contained in:
michael tesch 2017-04-27 23:28:22 +02:00
parent e6ed323672
commit b9492ad4af
2 changed files with 4 additions and 2 deletions

View File

@ -1330,13 +1330,15 @@ bool TBWidget::InvokePointerDown(int x, int y, int click_count, MODIFIER_KEYS mo
return false;
}
bool TBWidget::InvokePointerUp(int x, int y, MODIFIER_KEYS modifierkeys, bool touch)
bool TBWidget::InvokePointerUp(int x, int y, int click_count, MODIFIER_KEYS modifierkeys, bool touch)
{
if (captured_widget)
{
captured_widget->ConvertFromRoot(x, y);
TBWidgetEvent ev_up(EVENT_TYPE_POINTER_UP, x, y, touch, modifierkeys);
TBWidgetEvent ev_click(EVENT_TYPE_CLICK, x, y, touch, modifierkeys);
ev_up.count = click_count;
ev_click.count = click_count;
captured_widget->InvokeEvent(ev_up);
if (!cancel_click && captured_widget && captured_widget->GetHitStatus(x, y))
captured_widget->InvokeEvent(ev_click);

View File

@ -971,7 +971,7 @@ public:
bool InvokeEvent(TBWidgetEvent &ev);
bool InvokePointerDown(int x, int y, int click_count, MODIFIER_KEYS modifierkeys, bool touch);
bool InvokePointerUp(int x, int y, MODIFIER_KEYS modifierkeys, bool touch);
bool InvokePointerUp(int x, int y, int click_count, MODIFIER_KEYS modifierkeys, bool touch);
void InvokePointerMove(int x, int y, MODIFIER_KEYS modifierkeys, bool touch);
bool InvokeWheel(int x, int y, int delta_x, int delta_y, MODIFIER_KEYS modifierkeys);