From ec0b4320d4c770b75387c365d714c4d9ebdb2c41 Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Thu, 31 Mar 2016 14:04:14 -0500 Subject: HACK: fix input focus on terminal This makes the terminal grab focus no matter what on SetPageFocus which isn't ideal but it's unlikely that any other visible input elements will be on the page with a terminal anyway. Credit _that for pointing me in the right direction for this fix. Change-Id: I2b0e6fc1169521f58e863c58f7ef3578413dfb21 --- gui/terminal.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gui/terminal.cpp b/gui/terminal.cpp index 29b0e8469..2b2671c0f 100644 --- a/gui/terminal.cpp +++ b/gui/terminal.cpp @@ -896,6 +896,10 @@ void GUITerminal::InitAndResize() void GUITerminal::SetPageFocus(int inFocus) { - if (inFocus && isConditionTrue()) + if (inFocus && isConditionTrue()) { + // TODO: grab focus correctly, this hack grabs focus and insists that the terminal be the focus regardless of other elements + // It's highly unlikely that there will be any other visible input elements on the page anyway... + SetInputFocus(1); InitAndResize(); + } } -- cgit v1.2.3