summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-03-05 14:51:16 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2013-03-05 22:54:51 +0000
commite8950dee22e82c00dcf48efe2b7125d87776c682 (patch)
treed5226e01f2f9e6b6e55d912a7663ac4d4ec621b7 /render
parent461d4576fbbe5a811074224b578d98af9f42de3c (diff)
downloadnetsurf-e8950dee22e82c00dcf48efe2b7125d87776c682.tar.gz
netsurf-e8950dee22e82c00dcf48efe2b7125d87776c682.tar.bz2
Propagate native caret clip rect through core.
Diffstat (limited to 'render')
-rw-r--r--render/html_interaction.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/render/html_interaction.c b/render/html_interaction.c
index 87a08a4a7..805932e31 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -1144,11 +1144,20 @@ void html_set_focus(html_content *html, html_focus_type focus_type,
} else if (focus_type != HTML_FOCUS_SELF && hide_caret) {
msg_data.caret.type = CONTENT_CARET_HIDE;
} else {
+ struct rect cr;
+ if (clip != NULL) {
+ cr = *clip;
+ cr.x0 += x_off;
+ cr.y0 += y_off;
+ cr.x1 += x_off;
+ cr.y1 += y_off;
+ }
+
msg_data.caret.type = CONTENT_CARET_SET_POS;
msg_data.caret.pos.x = x + x_off;
msg_data.caret.pos.y = y + y_off;
msg_data.caret.pos.height = height;
- msg_data.caret.pos.clip = clip;
+ msg_data.caret.pos.clip = (clip == NULL) ? NULL : &cr;
}
/* Inform of the content's drag status change */