1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-13 11:12:19 -08:00

Fix input method synchronization problems

* java/debug.sh (gdbserver_cmd, is_root): Prefer TCP again.
* java/org/gnu/emacs/EmacsNative.java (EmacsNative): New
function `queryAndSpin'.
* java/org/gnu/emacs/EmacsService.java (EmacsService)
(icBeginSynchronous, icEndSynchronous, viewGetSelection): New
synchronization functions.
(resetIC, updateCursorAnchorInfo): Call those instead.
* java/org/gnu/emacs/EmacsView.java (onCreateInputConnection):
Call viewGetSelection.
* src/android.c (JNICALL, android_answer_query_spin): New
functions.
This commit is contained in:
Po Lu 2023-06-04 12:04:15 +08:00
parent c389df992a
commit 740af4668c
5 changed files with 123 additions and 38 deletions

View file

@ -177,6 +177,12 @@ public final class EmacsNative
main thread's looper to respond. */
public static native void endSynchronous ();
/* Prevent deadlocks while reliably allowing queries from the Emacs
thread to the main thread to complete by waiting for a query to
start from the main thread, then answer it; assume that a query
is certain to start shortly. */
public static native void answerQuerySpin ();
/* Return whether or not KEYCODE_VOLUME_DOWN, KEYCODE_VOLUME_UP and
KEYCODE_VOLUME_MUTE should be forwarded to Emacs. */
public static native boolean shouldForwardMultimediaButtons ();