diff options
author | Jan Arne Petersen <jpetersen@openismus.com> | 2013-01-31 15:52:23 +0100 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-02-15 17:08:01 -0500 |
commit | 1cc9e08d2fbd59e34cf5009acd5067a6b171c20a (patch) | |
tree | 2ca0e325d7c01c357d8d85174b15006054c26ed2 /clients/keyboard.c | |
parent | 964b517c9b39d9655257c3968c32c0fb81be9613 (diff) | |
download | weston-1cc9e08d2fbd59e34cf5009acd5067a6b171c20a.tar.gz |
text: Split out cursor_position
Add an extra cursor_position, which also allows to change the anchor
(for slections). Change the index type to int to allow setting it before
the beginning of a commited string.
The cursor should not be moved as a direct repsonse to this event but
atomically on the next commit_string event.
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Diffstat (limited to 'clients/keyboard.c')
-rw-r--r-- | clients/keyboard.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clients/keyboard.c b/clients/keyboard.c index 8d948704..3760ff7d 100644 --- a/clients/keyboard.c +++ b/clients/keyboard.c @@ -321,10 +321,12 @@ virtual_keyboard_commit_preedit(struct virtual_keyboard *keyboard) keyboard->serial, "", ""); + input_method_context_cursor_position(keyboard->context, + keyboard->serial, + 0, 0); input_method_context_commit_string(keyboard->context, keyboard->serial, - keyboard->preedit_string, - strlen(keyboard->preedit_string)); + keyboard->preedit_string); free(keyboard->preedit_string); keyboard->preedit_string = strdup(""); } |