window: avoid window_event_cb to be called on destroyed children

This uses quite some CPU resources because of the refocus happening when FormFields are cleared.
This commit is contained in:
Raphael Coeffic
2022-06-11 15:13:11 +02:00
committed by Raphael Coeffic
parent f6598a11e4
commit bc793651f4
+1
View File
@@ -299,6 +299,7 @@ void Window::clearLvgl()
window->clearLvgl();
}
lv_obj_remove_event_cb(lvobj, window_event_cb);
lv_obj_set_user_data(lvobj, nullptr);
lv_group_remove_obj(lvobj);
lvobj = nullptr;