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 @@ else if (MeasureSpec.getMode (heightMeasureSpec) == MeasureSpec.AT_MOST 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 ();