From: Simon Glass <simon.glass@canonical.com>
Add a text-input info parameter to scene_txtin_close() to prepare for
passing the vidconsole context when closing. For now the caller passes
NULL but this will be updated in a later commit.
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---
boot/scene_internal.h | 3 ++-
boot/scene_txtin.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
@@ -588,8 +588,9 @@ int scene_txtin_open(struct scene *scn, struct scene_obj *obj,
* Close out the text editor after use
*
* @scn: Scene containing the object
+ * @tin: Text-input info
*/
-void scene_txtin_close(struct scene *scn);
+void scene_txtin_close(struct scene *scn, struct scene_txtin *tin);
/**
* scene_obj_calc_bbox() - Calculate bounding boxes for an object
@@ -106,7 +106,7 @@ static void scene_txtin_putch(struct cli_line_state *cls, int ch)
vidconsole_put_char(scn->expo->cons, NULL, ch);
}
-void scene_txtin_close(struct scene *scn)
+void scene_txtin_close(struct scene *scn, struct scene_txtin *tin)
{
/* cursor is not needed now */
vidconsole_readline_end(scn->expo->cons, NULL);
@@ -180,7 +180,7 @@ int scene_txtin_send_key(struct scene_obj *obj, struct scene_txtin *tin,
memcpy(abuf_data(&tin->buf), abuf_data(&scn->buf),
abuf_size(&scn->buf));
- scene_txtin_close(scn);
+ scene_txtin_close(scn, NULL);
} else {
event->type = EXPOACT_QUIT;
log_debug("menu quit\n");