Merge from savannah/emacs-30
73a58329a6
Fix omission of updates to child frames on Android
This commit is contained in:
commit
e11e6d0bbe
3 changed files with 22 additions and 23 deletions
|
@ -267,13 +267,6 @@ public final class EmacsView extends ViewGroup
|
|||
return canvas;
|
||||
}
|
||||
|
||||
public synchronized void
|
||||
prepareForLayout (int wantedWidth, int wantedHeight)
|
||||
{
|
||||
measuredWidth = wantedWidth;
|
||||
measuredHeight = wantedWidth;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void
|
||||
onMeasure (int widthMeasureSpec, int heightMeasureSpec)
|
||||
|
@ -773,23 +766,30 @@ else if (child.getVisibility () != GONE)
|
|||
|
||||
/* Collect the bitmap storage; it could be large. */
|
||||
Runtime.getRuntime ().gc ();
|
||||
|
||||
super.onDetachedFromWindow ();
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void
|
||||
public void
|
||||
onAttachedToWindow ()
|
||||
{
|
||||
isAttachedToWindow = true;
|
||||
synchronized (this)
|
||||
{
|
||||
isAttachedToWindow = true;
|
||||
|
||||
/* Dirty the bitmap, as it was destroyed when onDetachedFromWindow
|
||||
was called. */
|
||||
bitmapDirty = true;
|
||||
/* Dirty the bitmap, as it was destroyed when
|
||||
onDetachedFromWindow was called. */
|
||||
bitmapDirty = true;
|
||||
|
||||
/* Now expose the view contents again. */
|
||||
EmacsNative.sendExpose (this.window.handle, 0, 0,
|
||||
measuredWidth, measuredHeight);
|
||||
/* Rather than unconditionally generating an exposure event upon
|
||||
window attachment, avoid delivering successive Exposure
|
||||
events if the size of the window has changed but is still to
|
||||
be reported by clearing the measured width and height, and
|
||||
requesting another layout computation. */
|
||||
measuredWidth = measuredHeight = 0;
|
||||
}
|
||||
|
||||
requestLayout ();
|
||||
super.onAttachedToWindow ();
|
||||
}
|
||||
|
||||
|
|
|
@ -492,7 +492,6 @@ private static class Coordinate
|
|||
/* Attach the view. */
|
||||
try
|
||||
{
|
||||
view.prepareForLayout (width, height);
|
||||
windowManager.addView (view, params);
|
||||
|
||||
/* Record the window manager being used in the
|
||||
|
@ -517,11 +516,6 @@ private static class Coordinate
|
|||
public void
|
||||
run ()
|
||||
{
|
||||
/* Prior to mapping the view, set its measuredWidth and
|
||||
measuredHeight to some reasonable value, in order to
|
||||
avoid excessive bitmap dirtying. */
|
||||
|
||||
view.prepareForLayout (width, height);
|
||||
view.setVisibility (View.VISIBLE);
|
||||
|
||||
if (!getDontFocusOnMap ())
|
||||
|
|
|
@ -1279,7 +1279,12 @@ handle_one_android_event (struct android_display_info *dpyinfo,
|
|||
{
|
||||
expose_frame (f, event->xexpose.x, event->xexpose.y,
|
||||
event->xexpose.width, event->xexpose.height);
|
||||
show_back_buffer (f);
|
||||
|
||||
/* Do not display the back buffer if F is yet being
|
||||
updated, as this might trigger premature bitmap
|
||||
reconfiguration. */
|
||||
if (FRAME_ANDROID_COMPLETE_P (f))
|
||||
show_back_buffer (f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue