From ac785ca7520ed477ec491db066d112eda55dc2cc Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 21 Jan 2022 00:44:04 +0900 Subject: [PATCH] [qwaq] Send app focus event on startup Terminal apps effectively always have focus (unless I find a way to know when an xterm loses/gains focus). Fixes input-app not updating on evdev events. --- ruamoko/qwaq/builtins/term-input.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ruamoko/qwaq/builtins/term-input.c b/ruamoko/qwaq/builtins/term-input.c index 7ebbde1d2..697cd2e7c 100644 --- a/ruamoko/qwaq/builtins/term-input.c +++ b/ruamoko/qwaq/builtins/term-input.c @@ -860,6 +860,12 @@ bi_init_input (progs_t *pr) qwaq_input_init (res); res->initialized = 1; create_thread (qwaq_input_thread, res); + + IE_event_t event = { + .type = ie_app_gain_focus, + .when = Sys_LongTime (), + }; + IE_Send_Event (&event); } static builtin_t builtins[] = {