diff options
Diffstat (limited to 'src/androidterm.c')
| -rw-r--r-- | src/androidterm.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/androidterm.c b/src/androidterm.c index c302e3f2877..211faabf5c2 100644 --- a/src/androidterm.c +++ b/src/androidterm.c | |||
| @@ -885,6 +885,11 @@ handle_one_android_event (struct android_display_info *dpyinfo, | |||
| 885 | if (!f) | 885 | if (!f) |
| 886 | goto OTHER; | 886 | goto OTHER; |
| 887 | 887 | ||
| 888 | if (event->xkey.counter) | ||
| 889 | /* This event was generated by `performEditorAction'. Make | ||
| 890 | sure it is processed before any subsequent edits. */ | ||
| 891 | textconv_barrier (f, event->xkey.counter); | ||
| 892 | |||
| 888 | wchar_t copy_buffer[129]; | 893 | wchar_t copy_buffer[129]; |
| 889 | wchar_t *copy_bufptr = copy_buffer; | 894 | wchar_t *copy_bufptr = copy_buffer; |
| 890 | int copy_bufsiz = 128 * sizeof (wchar_t); | 895 | int copy_bufsiz = 128 * sizeof (wchar_t); |
| @@ -5178,7 +5183,10 @@ NATIVE_NAME (performEditorAction) (JNIEnv *env, jobject object, | |||
| 5178 | 5183 | ||
| 5179 | android_write_event (&event); | 5184 | android_write_event (&event); |
| 5180 | 5185 | ||
| 5181 | /* Finally, send the return key press. */ | 5186 | /* Finally, send the return key press. `counter' is set; this means |
| 5187 | that a text conversion barrier will be generated once the event | ||
| 5188 | is read, which will cause subsequent edits to wait until the | ||
| 5189 | edits associated with this key press complete. */ | ||
| 5182 | 5190 | ||
| 5183 | event.xkey.type = ANDROID_KEY_PRESS; | 5191 | event.xkey.type = ANDROID_KEY_PRESS; |
| 5184 | event.xkey.serial = ++event_serial; | 5192 | event.xkey.serial = ++event_serial; |
| @@ -5187,6 +5195,7 @@ NATIVE_NAME (performEditorAction) (JNIEnv *env, jobject object, | |||
| 5187 | event.xkey.state = 0; | 5195 | event.xkey.state = 0; |
| 5188 | event.xkey.keycode = 66; | 5196 | event.xkey.keycode = 66; |
| 5189 | event.xkey.unicode_char = 0; | 5197 | event.xkey.unicode_char = 0; |
| 5198 | event.xkey.counter = ++edit_counter; | ||
| 5190 | 5199 | ||
| 5191 | android_write_event (&event); | 5200 | android_write_event (&event); |
| 5192 | } | 5201 | } |
| @@ -5234,6 +5243,7 @@ NATIVE_NAME (performContextMenuAction) (JNIEnv *env, jobject object, | |||
| 5234 | event.xkey.state = 0; | 5243 | event.xkey.state = 0; |
| 5235 | event.xkey.keycode = 66; | 5244 | event.xkey.keycode = 66; |
| 5236 | event.xkey.unicode_char = 0; | 5245 | event.xkey.unicode_char = 0; |
| 5246 | event.xkey.counter = ++edit_counter; | ||
| 5237 | 5247 | ||
| 5238 | android_write_event (&event); | 5248 | android_write_event (&event); |
| 5239 | } | 5249 | } |