summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/gui.h1
-rw-r--r--gtk/gtk_window.c5
-rw-r--r--riscos/window.c28
3 files changed, 32 insertions, 2 deletions
diff --git a/desktop/gui.h b/desktop/gui.h
index e0ad49aa0..be1686510 100644
--- a/desktop/gui.h
+++ b/desktop/gui.h
@@ -47,6 +47,7 @@ void gui_window_set_url(struct gui_window *g, const char *url);
void gui_window_start_throbber(struct gui_window *g);
void gui_window_stop_throbber(struct gui_window *g);
void gui_window_place_caret(struct gui_window *g, int x, int y, int height);
+void gui_window_remove_caret(struct gui_window *g);
void gui_window_new_content(struct gui_window *g);
struct gui_download_window *gui_download_window_create(const char *url,
diff --git a/gtk/gtk_window.c b/gtk/gtk_window.c
index 461849d6f..499afc073 100644
--- a/gtk/gtk_window.c
+++ b/gtk/gtk_window.c
@@ -294,6 +294,11 @@ void gui_window_place_caret(gui_window *g, int x, int y, int height)
}
+void gui_window_remove_caret(struct gui_window *g)
+{
+}
+
+
void html_redraw(struct content *c, int x, int y,
int width, int height,
int clip_x0, int clip_y0, int clip_x1, int clip_y1,
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));
@@ -1174,6 +1174,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.
*/