mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 02:58:26 +08:00
improve double click
This commit is contained in:
parent
fce0869c8d
commit
8dad483a24
@ -1,5 +1,8 @@
|
|||||||
# 最新动态
|
# 最新动态
|
||||||
|
|
||||||
|
2023/03/20
|
||||||
|
* 修复分发double_clicked事件时存在的野指针风险(感谢雨欣提供补丁)
|
||||||
|
|
||||||
2023/03/16
|
2023/03/16
|
||||||
* 完善JSON((感谢俊杰提供补丁)
|
* 完善JSON((感谢俊杰提供补丁)
|
||||||
|
|
||||||
|
@ -345,9 +345,10 @@ static ret_t input_device_status_dispatch_input_event(input_device_status_t* ids
|
|||||||
|
|
||||||
if (delta_time < TK_DOUBLE_CLICK_TIME && tk_abs(delta_x) < TK_DOUBLE_CLICK_XY &&
|
if (delta_time < TK_DOUBLE_CLICK_TIME && tk_abs(delta_x) < TK_DOUBLE_CLICK_XY &&
|
||||||
tk_abs(delta_y) < TK_DOUBLE_CLICK_XY) {
|
tk_abs(delta_y) < TK_DOUBLE_CLICK_XY) {
|
||||||
|
event_t* d_evt;
|
||||||
pointer_event_t double_click;
|
pointer_event_t double_click;
|
||||||
e = pointer_event_init(&double_click, EVT_DOUBLE_CLICK, widget, evt->x, evt->y);
|
d_evt = pointer_event_init(&double_click, EVT_DOUBLE_CLICK, widget, evt->x, evt->y);
|
||||||
widget_dispatch_event_to_target_recursive(widget, e);
|
widget_dispatch_event_to_target_recursive(widget, d_evt);
|
||||||
log_debug("double clicked\n");
|
log_debug("double clicked\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user