diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-01-04 14:48:58 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-01-04 14:48:58 +0000 |
commit | 838359194e423fb5c568fca75f9ab6e00600be6c (patch) | |
tree | 15ec73dab665c1cac8b4363b4e3fdc2bb21ad543 /desktop/textarea.c | |
parent | 8b253a215134c104f853165b4a674ffc24be8cbe (diff) | |
download | netsurf-838359194e423fb5c568fca75f9ab6e00600be6c.tar.gz netsurf-838359194e423fb5c568fca75f9ab6e00600be6c.tar.bz2 |
Return message to client when textarea is modified.
Diffstat (limited to 'desktop/textarea.c')
-rw-r--r-- | desktop/textarea.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/desktop/textarea.c b/desktop/textarea.c index bfa07ad4f..f9712ac84 100644 --- a/desktop/textarea.c +++ b/desktop/textarea.c @@ -160,6 +160,7 @@ static void textarea_normalise_text(struct textarea *ta, unsigned int b_start, unsigned int b_len) { bool multi = (ta->flags & TEXTAREA_MULTILINE) ? true : false; + struct textarea_msg msg; unsigned int index; /* Remove CR characters. If it's a CRLF pair delete the CR, or replace @@ -187,6 +188,14 @@ static void textarea_normalise_text(struct textarea *ta, ta->text.data[b_start + index] = ' '; } + /* Build text modified message */ + msg.ta = ta; + msg.type = TEXTAREA_MSG_TEXT_MODIFIED; + msg.data.modified.text = ta->text.data; + msg.data.modified.len = ta->text.len; + + /* Pass message to client */ + ta->callback(ta->data, &msg); } |