diff options
| author | Po Lu <luangruo@yahoo.com> | 2025-02-19 20:40:12 +0800 |
|---|---|---|
| committer | Po Lu <luangruo@yahoo.com> | 2025-02-19 20:40:12 +0800 |
| commit | ded77feffface0c167edacf0d807273f3d4878db (patch) | |
| tree | 7849fa1827ed2ad92420d5e43589a8a43d0eaca9 /java/org/gnu/emacs/EmacsService.java | |
| parent | e97be722d392056b6ef9e47664273ee2ca7df374 (diff) | |
Fix remaining Android bugs reported over the past months
* java/org/gnu/emacs/EmacsActivity.java (attachWindow):
Guarantee that child windows promoted to toplevels receive
layout parameters that direct them to receive their parents'
dimensions. Otherwise, the size of the window as a child is
retained on Huawei HarmonyOS 4.2 and possibly other Android
distributions.
* java/org/gnu/emacs/EmacsService.java (updateCursorAnchorInfo):
Run anchor updates on the UI thread, as
`InputMethodManager#updateCursorAnchorInfo' is liable to call
`View#requestLayout'.
* java/org/gnu/emacs/EmacsView.java (onMeasure): Always call
`measureChildren', or child frames' onLayout handlers might not
be invoked after they request a layout cycle and are duly
processed in `onLayout'.
(swapBuffers): Delete erroneous commentary.
* java/org/gnu/emacs/EmacsWindow.java (viewLayout): If
overrideRedirect, don't inadvertently clear rect.left and
rect.top by recording the window's WM window-relative position.
Fix typos.
(reparentTo): Invalidate focus after transferring frame.
(translateCoordinates): Account for override-redirect windows.
Mostly important for mouse-drag-and-drop-region.
Diffstat (limited to 'java/org/gnu/emacs/EmacsService.java')
| -rw-r--r-- | java/org/gnu/emacs/EmacsService.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/java/org/gnu/emacs/EmacsService.java b/java/org/gnu/emacs/EmacsService.java index 04563590dc4..8cdf5011b70 100644 --- a/java/org/gnu/emacs/EmacsService.java +++ b/java/org/gnu/emacs/EmacsService.java @@ -937,11 +937,11 @@ public final class EmacsService extends Service } public void - updateCursorAnchorInfo (EmacsWindow window, float x, + updateCursorAnchorInfo (final EmacsWindow window, float x, float y, float yBaseline, float yBottom) { - CursorAnchorInfo info; + final CursorAnchorInfo info; CursorAnchorInfo.Builder builder; Matrix matrix; int[] offsets; @@ -963,9 +963,14 @@ public final class EmacsService extends Service Log.d (TAG, ("updateCursorAnchorInfo: " + x + " " + y + " " + yBaseline + "-" + yBottom)); - icBeginSynchronous (); - window.view.imManager.updateCursorAnchorInfo (window.view, info); - icEndSynchronous (); + EmacsService.SERVICE.runOnUiThread (new Runnable () { + @Override + public void + run () + { + window.view.imManager.updateCursorAnchorInfo (window.view, info); + } + }); } |
