[Concept,06/16] expo: Allow entering text into textline in non-popup expos

Message ID 20251115185212.539268-7-sjg@u-boot.org
State New
Headers
Series Continue TKey development |

Commit Message

Simon Glass Nov. 15, 2025, 6:51 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Currently textlines only support text entry when with popup expos. In
some cases we want to have menu items to support this, e.g. to enter a
passphrase to unlock an encrypted disk.

Add the missing logic.

Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 boot/scene.c | 9 +++++++++
 1 file changed, 9 insertions(+)
  

Patch

diff --git a/boot/scene.c b/boot/scene.c
index 77926bda5fa..1392d063c49 100644
--- a/boot/scene.c
+++ b/boot/scene.c
@@ -1145,6 +1145,15 @@  int scene_send_key(struct scene *scn, int key, struct expo_action *event)
 			if (ret)
 				return log_msg_ret("key", ret);
 			break;
+		} else if (!(obj->flags & SCENEOF_OPEN) &&
+			   obj->type == SCENEOBJT_TEXTLINE) {
+			struct scene_obj_textline *tline;
+
+			tline = (struct scene_obj_textline *)obj;
+			ret = scene_textline_send_key(scn, tline, key, event);
+			if (ret)
+				return log_msg_ret("key", ret);
+			break;
 		}
 	}