From 55dd110cf3356cb33a1ca9a37c894eba388779f6 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 27 Aug 2023 09:24:01 +0800 Subject: [PATCH] Update Android port * java/org/gnu/emacs/EmacsView.java (onLayout): Provide for occasions where the saved measured dimensions differ from that saved by the view. --- java/org/gnu/emacs/EmacsView.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/java/org/gnu/emacs/EmacsView.java b/java/org/gnu/emacs/EmacsView.java index 12d8ff4da56..f964f096d88 100644 --- a/java/org/gnu/emacs/EmacsView.java +++ b/java/org/gnu/emacs/EmacsView.java @@ -330,11 +330,17 @@ public final class EmacsView extends ViewGroup measuredHeight = bottom - top; } + /* If oldMeasuredHeight or oldMeasuredWidth are wrong, set changed + to true as well. */ + + if (right - left != oldMeasuredWidth + || bottom - top != oldMeasuredHeight) + changed = true; + /* Dirty the back buffer if the layout change resulted in the view being resized. */ - if (changed && (right - left != oldMeasuredWidth - || bottom - top != oldMeasuredHeight)) + if (changed) { explicitlyDirtyBitmap (); -- 2.39.5