Skip to content

group_del does not clear indev->group #2963

Closed
@knifter

Description

@knifter

Perform all steps below and tick them with [x]

  • Check the related part of the Documentation
    Update lvgl to the latest version
    Reproduce the issue in a Simulator

Describe the bug

indev->group is kept when group is deleted.

When I delete a group (group_del()), that group could still be assigned to an indev (lv_indev_set_group()).
As the objects in the group are 'told' the group is deleted, I would assume the indev is as well. But it is not. I had to make a workaround for this as I'm deleting groups, setting lv_indev_set_group(indev, nullptr) to remove it.
Not sure if this is intended behaviour but since these kind of things seem to be taken care of in the rest of LVGL I would think this is a bug.

To Reproduce

v_group_t* g = lv_group_create();
lv_indev_set_group(g);
lv_group_del(g);
have some fun with your indev->group

Expected behavior

I think group_del shoudl iterate the indev's to see if anyone has its group set to the one going to be deleted.

Screenshots or video

Activity

knifter

knifter commented on Jan 5, 2022

@knifter
ContributorAuthor

@kisvegabor: I can make a pull request if you like, have to fork anyway as I have two other functions (group_insert_next(), lv_ll_ins_next()) I'd like to add & create a PR for.

kisvegabor

kisvegabor commented on Jan 5, 2022

@kisvegabor
Member

It's really a bug. A PR would welcome, thank you! 🙂

knifter

knifter commented on Jan 5, 2022

@knifter
ContributorAuthor

The PR fixes the problem for me

knifter

knifter commented on Jan 6, 2022

@knifter
ContributorAuthor

PR was merged into master

embeddedt

embeddedt commented on Jan 6, 2022

@embeddedt
Member

Not yet; I approved it but didn't merge it quite yet as I wanted @kisvegabor to confirm.

reopened this on Jan 6, 2022
kisvegabor

kisvegabor commented on Jan 6, 2022

@kisvegabor
Member

Merged now, thank you! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      group_del does not clear indev->group · Issue #2963 · lvgl/lvgl