summaryrefslogtreecommitdiff
path: root/desktop/textinput.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-03-05 22:53:33 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2013-03-05 22:54:51 +0000
commit037beb44fb8f14c80963e54e9b430a0ef03a9d5d (patch)
tree86a19cc2da29f7aa405126ef4dc17ae7e02855d1 /desktop/textinput.c
parente8950dee22e82c00dcf48efe2b7125d87776c682 (diff)
downloadnetsurf-037beb44fb8f14c80963e54e9b430a0ef03a9d5d.tar.gz
netsurf-037beb44fb8f14c80963e54e9b430a0ef03a9d5d.tar.bz2
Pass caret clip rect out to front ends. (Nothing actually using them yet.)
Diffstat (limited to 'desktop/textinput.c')
-rw-r--r--desktop/textinput.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/desktop/textinput.c b/desktop/textinput.c
index 4d280d536..d2a9dadc4 100644
--- a/desktop/textinput.c
+++ b/desktop/textinput.c
@@ -56,7 +56,7 @@
* \param x X coordinate of the caret
* \param y Y coordinate
* \param height Height of caret
- * \param clip Clip rectangle for caret
+ * \param clip Clip rectangle for caret, or NULL if none
*/
void browser_window_place_caret(struct browser_window *bw, int x, int y,
int height, const struct rect *clip)
@@ -65,6 +65,7 @@ void browser_window_place_caret(struct browser_window *bw, int x, int y,
int pos_x = 0;
int pos_y = 0;
struct rect cr;
+ struct rect *crp = NULL;
/* Find top level browser window */
root_bw = browser_window_get_root(bw);
@@ -79,12 +80,12 @@ void browser_window_place_caret(struct browser_window *bw, int x, int y,
cr.y0 += pos_y;
cr.x1 += pos_x;
cr.y1 += pos_y;
+ crp = &cr;
}
/* TODO: intersect with bw viewport */
- /* TODO: pass clip rect out to GUI */
- gui_window_place_caret(root_bw->window, x, y, height * bw->scale);
+ gui_window_place_caret(root_bw->window, x, y, height * bw->scale, crp);
/* Set focus browser window */
root_bw->focus = bw;