diff options
| author | Po Lu | 2023-03-06 11:25:51 +0800 |
|---|---|---|
| committer | Po Lu | 2023-03-06 11:25:51 +0800 |
| commit | 97ca0a855116797779450bfb758ea6c706348df3 (patch) | |
| tree | ac323afb4eb8a92f55f76d31ea89589de65fda9b /src/androidfns.c | |
| parent | 0dbbdd20f44c7757835a85a30763af18491f6eb1 (diff) | |
| download | emacs-97ca0a855116797779450bfb758ea6c706348df3.tar.gz emacs-97ca0a855116797779450bfb758ea6c706348df3.zip | |
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.
Diffstat (limited to 'src/androidfns.c')
| -rw-r--r-- | src/androidfns.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/androidfns.c b/src/androidfns.c index 4837b00a21e..5a23e8bd196 100644 --- a/src/androidfns.c +++ b/src/androidfns.c | |||
| @@ -1883,9 +1883,10 @@ android_create_tip_frame (struct android_display_info *dpyinfo, | |||
| 1883 | unsigned long mask; | 1883 | unsigned long mask; |
| 1884 | 1884 | ||
| 1885 | block_input (); | 1885 | block_input (); |
| 1886 | mask = ANDROID_CW_OVERRIDE_REDIRECT; | 1886 | mask = ANDROID_CW_OVERRIDE_REDIRECT | ANDROID_CW_BACK_PIXEL; |
| 1887 | 1887 | ||
| 1888 | attrs.override_redirect = true; | 1888 | attrs.override_redirect = true; |
| 1889 | attrs.background_pixel = FRAME_BACKGROUND_PIXEL (f); | ||
| 1889 | tip_window | 1890 | tip_window |
| 1890 | = FRAME_ANDROID_WINDOW (f) | 1891 | = FRAME_ANDROID_WINDOW (f) |
| 1891 | = android_create_window (FRAME_DISPLAY_INFO (f)->root_window, | 1892 | = android_create_window (FRAME_DISPLAY_INFO (f)->root_window, |
| @@ -2314,10 +2315,6 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, | |||
| 2314 | android_map_raised (FRAME_ANDROID_WINDOW (tip_f)); | 2315 | android_map_raised (FRAME_ANDROID_WINDOW (tip_f)); |
| 2315 | unblock_input (); | 2316 | unblock_input (); |
| 2316 | 2317 | ||
| 2317 | /* Synchronize with the UI thread. This is required to prevent ugly | ||
| 2318 | black splotches. */ | ||
| 2319 | android_sync (); | ||
| 2320 | |||
| 2321 | /* Garbage the tip frame too. */ | 2318 | /* Garbage the tip frame too. */ |
| 2322 | SET_FRAME_GARBAGED (tip_f); | 2319 | SET_FRAME_GARBAGED (tip_f); |
| 2323 | 2320 | ||
| @@ -2328,6 +2325,11 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, | |||
| 2328 | unbind_to (count_1, Qnil); | 2325 | unbind_to (count_1, Qnil); |
| 2329 | windows_or_buffers_changed = old_windows_or_buffers_changed; | 2326 | windows_or_buffers_changed = old_windows_or_buffers_changed; |
| 2330 | 2327 | ||
| 2328 | /* MapNotify events are not sent on Android, so make the frame | ||
| 2329 | visible. */ | ||
| 2330 | |||
| 2331 | SET_FRAME_VISIBLE (tip_f, true); | ||
| 2332 | |||
| 2331 | start_timer: | 2333 | start_timer: |
| 2332 | /* Let the tip disappear after timeout seconds. */ | 2334 | /* Let the tip disappear after timeout seconds. */ |
| 2333 | tip_timer = call3 (Qrun_at_time, timeout, Qnil, | 2335 | tip_timer = call3 (Qrun_at_time, timeout, Qnil, |