From 68de81fe8f95b2251b1f30b0e15ba858c17295fd Mon Sep 17 00:00:00 2001 From: John Tytgat Date: Wed, 21 Jul 2004 14:19:21 +0000 Subject: [project @ 2004-07-21 14:19:21 by joty] Added gui_window_remove_caret() to disown the caret. svn path=/import/netsurf/; revision=1133 --- riscos/window.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'riscos/window.c') diff --git a/riscos/window.c b/riscos/window.c index ba64774fd..06e4d9c0b 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -392,7 +392,7 @@ void ro_gui_window_redraw(struct gui_window *g, wimp_draw *redraw) bool clear_background = false; struct content *c = g->bw->current_content; os_error *error; - + /* Set the current redraw gui_window to get options from */ ro_gui_current_redraw_gui = g; @@ -447,7 +447,7 @@ void ro_gui_window_redraw(struct gui_window *g, wimp_draw *redraw) doesn't actually stop anything working, so we mask it out for now until a better fix is found. */ - if ((!ro_gui_current_redraw_gui->option.buffer_everything) || + if ((!ro_gui_current_redraw_gui->option.buffer_everything) || (error->errnum != 0x286)) { LOG(("xwimp_get_rectangle: 0x%x: %s", error->errnum, error->errmess)); @@ -1173,6 +1173,30 @@ void gui_window_place_caret(struct gui_window *g, int x, int y, int height) } +/** + * Remove/disown the caret. + * + * \param g window with caret + * + * \todo: do we want to do a test if g really owns the caret ? + */ + +void gui_window_remove_caret(struct gui_window *g) +{ + os_error *error; + + error = xwimp_set_caret_position(-1, -1, + 0, + 0, + 0, -1); + if (error) { + LOG(("xwimp_set_caret_position: 0x%x: %s", + error->errnum, error->errmess)); + warn_user("WimpError", error->errmess); + } +} + + /** * Process Key_Pressed events in a browser window. */ -- cgit v1.2.3