mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Update Android port
* java/org/gnu/emacs/EmacsService.java (sync): Delete function. * java/org/gnu/emacs/EmacsView.java (handleDirtyBitmap): Erase with window background. (onDetachedFromWindow): Only recycle bitmap if non-NULL. * java/org/gnu/emacs/EmacsWindow.java (background): New field. (changeWindowBackground): Set it. * src/android.c (struct android_emacs_service): Remove `sync'. (android_init_emacs_service): Likewise. (android_sync): Delete function. * src/androidfns.c (android_create_tip_frame): Set frame background color correctly. (Fx_show_tip): Make the tip frame visible. * src/androidgui.h: Update prototypes. * src/androidterm.c (handle_one_android_event): Handle tooltip movement correctly.
This commit is contained in:
parent
0dbbdd20f4
commit
97ca0a8551
7 changed files with 29 additions and 39 deletions
|
|
@ -481,25 +481,6 @@ public final class EmacsService extends Service
|
|||
return String.valueOf (keysym);
|
||||
}
|
||||
|
||||
public void
|
||||
sync ()
|
||||
{
|
||||
Runnable runnable;
|
||||
|
||||
runnable = new Runnable () {
|
||||
public void
|
||||
run ()
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
notify ();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
syncRunnable (runnable);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Start the Emacs service if necessary. On Android 26 and up,
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ public final class EmacsView extends ViewGroup
|
|||
= Bitmap.createBitmap (measuredWidth,
|
||||
measuredHeight,
|
||||
Bitmap.Config.ARGB_8888);
|
||||
bitmap.eraseColor (0xffffffff);
|
||||
bitmap.eraseColor (window.background | 0xff000000);
|
||||
|
||||
/* And canvases. */
|
||||
canvas = new Canvas (bitmap);
|
||||
|
|
@ -507,7 +507,10 @@ public final class EmacsView extends ViewGroup
|
|||
synchronized (this)
|
||||
{
|
||||
/* Recycle the bitmap and call GC. */
|
||||
bitmap.recycle ();
|
||||
|
||||
if (bitmap != null)
|
||||
bitmap.recycle ();
|
||||
|
||||
bitmap = null;
|
||||
canvas = null;
|
||||
surfaceView.setBitmap (null, null);
|
||||
|
|
|
|||
|
|
@ -129,6 +129,10 @@ public final class EmacsWindow extends EmacsHandleObject
|
|||
/* Whether or not this window is fullscreen. */
|
||||
public boolean fullscreen;
|
||||
|
||||
/* The window background pixel. This is used by EmacsView when
|
||||
creating new bitmaps. */
|
||||
public volatile int background;
|
||||
|
||||
public
|
||||
EmacsWindow (short handle, final EmacsWindow parent, int x, int y,
|
||||
int width, int height, boolean overrideRedirect)
|
||||
|
|
@ -183,6 +187,9 @@ public final class EmacsWindow extends EmacsHandleObject
|
|||
/* scratchGC is used as the argument to a FillRectangles req. */
|
||||
scratchGC.foreground = pixel;
|
||||
scratchGC.markDirty (false);
|
||||
|
||||
/* Make the background known to the view as well. */
|
||||
background = pixel;
|
||||
}
|
||||
|
||||
public Rect
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue