1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-18 17:01:01 -08:00

Avoid extraneous calls to the UI thread

* java/org/gnu/emacs/EmacsView.java (EmacsView)
(showOnScreenKeyboard, hideOnScreenKeyboard)
(onCheckIsTextEditor): Make synchronized.
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow)
(toggleOnScreenKeyboard): Don't post to the main thread.
This commit is contained in:
Po Lu 2023-06-11 08:52:10 +08:00
parent f9cede52fa
commit 5abc977bbb
2 changed files with 12 additions and 15 deletions

View file

@ -590,7 +590,7 @@ public final class EmacsView extends ViewGroup
super.onAttachedToWindow ();
}
public void
public synchronized void
showOnScreenKeyboard ()
{
/* Specifying no flags at all tells the system the user asked for
@ -599,7 +599,7 @@ public final class EmacsView extends ViewGroup
isCurrentlyTextEditor = true;
}
public void
public synchronized void
hideOnScreenKeyboard ()
{
imManager.hideSoftInputFromWindow (this.getWindowToken (),
@ -686,7 +686,7 @@ public final class EmacsView extends ViewGroup
}
@Override
public boolean
public synchronized boolean
onCheckIsTextEditor ()
{
/* If value is true, then the system will display the on screen