Scrolling part of a page is moving when hitting a button (not wanted)

Hi,
first of all, thank you for this great library!

I use a page object as a setting menu, there is enough objects on it, so the scrolling part can scroll. My problem is that depending on the position of the scrolling part if I hit one of the button on the page the scrolling part move, instead of calling the button’s click callback, but if the scrolling part is just in a different position, it works. I do not experience this problem on the simulator just on real hardware, but every other aspects of my code work on the simulator and on the real hardware (10 menus total), I only experience this problem on the real hardware.

Do somebody have a idea what could happen?

I’m still using LittlevGl V5.3, because my project is too near to the end to move to V6.0 right now.

Regards.

I do not experience this problem on the simulator just on real hardware

This usually means that it’s an issue with your driver. However, it could also be related to the fact that a finger naturally slides more on the screen than a mouse would.

Can you provide a small code sample?

I agree. If you use a touchpad be sure you set the last pressed coordinate when the touchpad is in released state.

We should mention this in the FAQ. It applies to all input devices.

Recently I was porting LittlevGL to a device with navigational buttons and I was wondering why buttons on the screen were never visually pressed. It turned out to be because I did not set the last key value when keys were released.

Do you mean LV_INDEV_TYPE_KEYPAD or LV_INDEV_TYPE_BUTTON?

It was LV_INDEV_TYPE_KEYPAD.

I’ve tried to address it here: https://github.com/littlevgl/lvgl/blob/master/src/lv_hal/lv_hal_indev.c#L141
It seems it’s not working. I’m examining it.

I’ve just tested it without setting the key for the released state and it worked for me.

Hmm, maybe it was something else in my setup then. Anyways it works now so no big deal. :slight_smile:

thank you @embeddedt and @kisvegabor,
I knew that I was setting the released state and coordinate correctly in the callback (which is why I didn’t understand the behavior I was experiencing),but you made me dig in a little more and I found out that the driver for the touch screen is sometime missing to flag that the touch screen was released, which end up that I’m not setting the state in the callback to released :slight_smile:
I’ll try to find why this happen but it doesn’t seem to be related to my LittlevGL code part.

Regards,

Good luck then :slight_smile: