lvgl手势事件判断为点击事件问题

lvgl手势事件判断为点击事件问题处理方法

1.打开文件lvgl\src\core\lv_indev.c

2. 修改函数

static void indev_proc_release(_lv_indev_proc_t * proc)
2.1 由原来的
/**
 * Process the released state of LV_INDEV_TYPE_POINTER input devices
 * @param proc pointer to an input device 'proc'
 */
static void indev_proc_release(_lv_indev_proc_t * proc)
{
    if(proc->wait_until_release != 0) {
        lv_event_send(proc->types.pointer.act_obj, LV_EVENT_PRESS_LOST, indev_act);
        if(indev_reset_check(proc)) return;

        /*
         * Actions:
         * lv_indev_wait_release() will reset proc->types.pointer.last_obj,
         * but keep scroll_throw_vect and scroll_obj, which may prevent searching
         * another new scroll object (in indev_proc_press(), the scroll_dir will
         * be reset, and scroll_obj kept, so find_scroll_obj() will not work).
         *
         * So stop the scroll throw here if any.
         */
        proc->types.pointer.scroll_throw_vect.x = 0;
        proc->types.pointer.scroll_throw_vect.y = 0;

        proc->types.pointer.act_obj  = NULL;
        proc->types.pointer.last_obj = NULL;
        proc->pr_timestamp           = 0;
        proc->longpr_rep_timestamp   = 0;
        proc->wait_until_release     

相关推荐

  1. lvgl手势事件判断事件问题

    2024-06-15 21:52:07       29 阅读
  2. Qt QTableView模拟表格事件

    2024-06-15 21:52:07       42 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-06-15 21:52:07       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-06-15 21:52:07       106 阅读
  3. 在Django里面运行非项目文件

    2024-06-15 21:52:07       87 阅读
  4. Python语言-面向对象

    2024-06-15 21:52:07       96 阅读

热门阅读

  1. 解决测试类Class not found报错

    2024-06-15 21:52:07       32 阅读
  2. 区块链之快照

    2024-06-15 21:52:07       30 阅读
  3. web开发的尽头是servlet

    2024-06-15 21:52:07       33 阅读
  4. 反射,枚举以及lambda表达式

    2024-06-15 21:52:07       22 阅读
  5. webpack和vite区别

    2024-06-15 21:52:07       24 阅读
  6. Vue待学习

    2024-06-15 21:52:07       22 阅读
  7. 正则表达式

    2024-06-15 21:52:07       27 阅读
  8. MyBatis-Plus 源码解说

    2024-06-15 21:52:07       20 阅读