Only receiving LV_EVENT_HOVER_* events on widget

Hello,

I’m trying to get a slider working but it seems to only be receiving hover events, no press/clicked events.

I set my input device up exactly as shown in for touch input devices Input device interface — LVGL documentation

Any idea what would be causing this to happen?
Thanks

What is your input device (indev_type)?

Have you registered the event you want by calling lv_obj_add_event_cb()?

indev_type is LV_INDEV_TYPE_POINTER

I’ve added an event callback for LV_EVENT_ALL and don’t see any press events come through, and my slider doesn’t move when I touch it. But when I touch it I see hover events coming through.

So I found the issue. I’m actually using LVGL via FFI from Rust, and my target compiler is arm-none-eabi-gcc which sets -fshort-enums by default, so I needed to pass that flag to bindgen. However now it seems to get stuck in an infinite loop somehow when I touch any widget.

So the source of the infinite loop is here: lvgl/src/core/lv_refr.c at c903c1dc0fdfae20bce69d0a48894bdebae278ff · lvgl/lvgl · GitHub

Why does it spin in an infinite loop here? Setting a flush wait callback fixes it.

Hello,

In your flush callback, do you call lv_flush_ready() ? Should be called at the end of your flush function.

It looks like the issue is related to your flush callback. Make sure you’re calling lv_flush_ready() at the end of your flush function.