aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/window_text_grid.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2019-03-02 19:35:36 -0800
committerPaul Gilbert2019-03-02 19:35:36 -0800
commit8393faf036e07f8844ee01e94173da5cdcbb7f77 (patch)
treef7d144a5dae7e3ac2aeea6b78d30bb8ecde7b94e /engines/glk/window_text_grid.cpp
parent3b8d006c8b7091f6e65a4c4865cc9aebb6452d38 (diff)
downloadscummvm-rg350-8393faf036e07f8844ee01e94173da5cdcbb7f77.tar.gz
scummvm-rg350-8393faf036e07f8844ee01e94173da5cdcbb7f77.tar.bz2
scummvm-rg350-8393faf036e07f8844ee01e94173da5cdcbb7f77.zip
GLK: Switch focus window immediately after requesting lines or chars
Diffstat (limited to 'engines/glk/window_text_grid.cpp')
-rw-r--r--engines/glk/window_text_grid.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/engines/glk/window_text_grid.cpp b/engines/glk/window_text_grid.cpp
index e0459e0b2e..226b2f1acd 100644
--- a/engines/glk/window_text_grid.cpp
+++ b/engines/glk/window_text_grid.cpp
@@ -265,6 +265,9 @@ void TextGridWindow::requestLineEvent(char *buf, uint maxlen, uint initlen) {
if (g_vm->gli_register_arr)
_inArrayRock = (*g_vm->gli_register_arr)(buf, maxlen, "&+#!Cn");
+
+ // Switch focus to the new window
+ _windows->inputGuessFocus();
}
void TextGridWindow::requestLineEventUni(uint32 *buf, uint maxlen, uint initlen) {
@@ -317,6 +320,23 @@ void TextGridWindow::requestLineEventUni(uint32 *buf, uint maxlen, uint initlen)
if (g_vm->gli_register_arr)
_inArrayRock = (*g_vm->gli_register_arr)(buf, maxlen, "&+#!Iu");
+
+ // Switch focus to the new window
+ _windows->inputGuessFocus();
+}
+
+void TextGridWindow::requestCharEvent() {
+ _charRequest = true;
+
+ // Switch focus to the new window
+ _windows->inputGuessFocus();
+}
+
+void TextGridWindow::requestCharEventUni() {
+ _charRequestUni = true;
+
+ // Switch focus to the new window
+ _windows->inputGuessFocus();
}
void TextGridWindow::cancelLineEvent(Event *ev) {