From 1651dc2fb142430046c83e2158335f1200149483 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 4 Aug 2019 14:10:30 +0100 Subject: RISC OS: Try setting the caret position to give the window focus. --- frontends/riscos/local_history.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/frontends/riscos/local_history.c b/frontends/riscos/local_history.c index 1b7d11e07..c6c3d8162 100644 --- a/frontends/riscos/local_history.c +++ b/frontends/riscos/local_history.c @@ -384,7 +384,6 @@ ro_local_history_open(struct ro_local_history_window *lhw, wimp_w parent) state.visible.x1 = width; state.visible.y1 = height; state.next = wimp_HIDDEN; - state.flags |= wimp_WINDOW_HAS_FOCUS; error = xwimp_open_window(PTR_WIMP_OPEN(&state)); if (error) { NSLOG(netsurf, INFO, "xwimp_open_window: 0x%x: %s", @@ -395,6 +394,15 @@ ro_local_history_open(struct ro_local_history_window *lhw, wimp_w parent) ro_gui_dialog_open_persistent(parent, lhw->core.wh, true); + /* Give the window focus. */ + error = xwimp_set_caret_position(lhw->core.wh, -1, 0, 0, -1, 0); + if (error) { + NSLOG(netsurf, INFO, + "xwimp_get_caret_position: 0x%x : %s", + error->errnum, + error->errmess); + } + local_history_scroll_to_cursor(lhw->session); return NSERROR_OK; -- cgit v1.2.3