diff options
| author | Po Lu | 2023-02-08 22:40:10 +0800 |
|---|---|---|
| committer | Po Lu | 2023-02-08 22:40:10 +0800 |
| commit | 0bd4b7fdab2fdf437c4a759d53dfdc9f667aefb1 (patch) | |
| tree | a1320da59f2f5e6a1c0f31b9fd504400da2fcfab /src | |
| parent | 7fb0df0ce2858eeb03ec18b540acf49a5b8d90c9 (diff) | |
| download | emacs-0bd4b7fdab2fdf437c4a759d53dfdc9f667aefb1.tar.gz emacs-0bd4b7fdab2fdf437c4a759d53dfdc9f667aefb1.zip | |
Update Android port
* doc/lispref/frames.texi (On-Screen Keyboards): Describe return
value of `frame-toggle-on-screen-keyboard'.
* java/org/gnu/emacs/EmacsSurfaceView.java (surfaceChanged)
(surfaceCreated, EmacsSurfaceView): Remove unuseful
synchronization code. The framework doesn't seem to look at
this at all.
* java/org/gnu/emacs/EmacsView.java (EmacsView):
(onLayout): Lay out the window after children.
(swapBuffers): Properly implement `force'.
(windowUpdated): Delete function.
* lisp/frame.el (frame-toggle-on-screen-keyboard): Return
whether or not the on screen keyboard might've been displayed.
* lisp/minibuffer.el (minibuffer-on-screen-keyboard-timer):
(minibuffer-on-screen-keyboard-displayed):
(minibuffer-setup-on-screen-keyboard):
(minibuffer-exit-on-screen-keyboard): Improve OSK dismissal when
there are consecutive minibuffers.
* lisp/touch-screen.el (touch-screen-window-selection-changed):
New function.
(touch-screen-handle-point-up): Register it as a window
selection changed function.
* src/android.c (struct android_emacs_window)
(android_init_emacs_window): Remove references to
`windowUpdated'.
(android_window_updated): Delete function.
* src/android.h (struct android_output): Remove
`last_configure_serial'.
* src/androidterm.c (handle_one_android_event)
(android_frame_up_to_date):
* src/androidterm.h (struct android_output): Remove frame
synchronization, as that does not work on Android.
Diffstat (limited to 'src')
| -rw-r--r-- | src/android.c | 21 | ||||
| -rw-r--r-- | src/android.h | 1 | ||||
| -rw-r--r-- | src/androidterm.c | 18 | ||||
| -rw-r--r-- | src/androidterm.h | 5 |
4 files changed, 0 insertions, 45 deletions
diff --git a/src/android.c b/src/android.c index a0e64471a05..ebd374addbf 100644 --- a/src/android.c +++ b/src/android.c | |||
| @@ -125,7 +125,6 @@ struct android_emacs_window | |||
| 125 | jclass class; | 125 | jclass class; |
| 126 | jmethodID swap_buffers; | 126 | jmethodID swap_buffers; |
| 127 | jmethodID toggle_on_screen_keyboard; | 127 | jmethodID toggle_on_screen_keyboard; |
| 128 | jmethodID window_updated; | ||
| 129 | }; | 128 | }; |
| 130 | 129 | ||
| 131 | /* The API level of the current device. */ | 130 | /* The API level of the current device. */ |
| @@ -1830,7 +1829,6 @@ android_init_emacs_window (void) | |||
| 1830 | FIND_METHOD (swap_buffers, "swapBuffers", "()V"); | 1829 | FIND_METHOD (swap_buffers, "swapBuffers", "()V"); |
| 1831 | FIND_METHOD (toggle_on_screen_keyboard, | 1830 | FIND_METHOD (toggle_on_screen_keyboard, |
| 1832 | "toggleOnScreenKeyboard", "(Z)V"); | 1831 | "toggleOnScreenKeyboard", "(Z)V"); |
| 1833 | FIND_METHOD (window_updated, "windowUpdated", "(J)V"); | ||
| 1834 | #undef FIND_METHOD | 1832 | #undef FIND_METHOD |
| 1835 | } | 1833 | } |
| 1836 | 1834 | ||
| @@ -4325,25 +4323,6 @@ android_toggle_on_screen_keyboard (android_window window, bool show) | |||
| 4325 | android_exception_check (); | 4323 | android_exception_check (); |
| 4326 | } | 4324 | } |
| 4327 | 4325 | ||
| 4328 | /* Tell the window system that all configure events sent to WINDOW | ||
| 4329 | have been fully processed, and that it is now okay to display its | ||
| 4330 | new contents. SERIAL is the serial of the last configure event | ||
| 4331 | processed. */ | ||
| 4332 | |||
| 4333 | void | ||
| 4334 | android_window_updated (android_window window, unsigned long serial) | ||
| 4335 | { | ||
| 4336 | jobject object; | ||
| 4337 | jmethodID method; | ||
| 4338 | |||
| 4339 | object = android_resolve_handle (window, ANDROID_HANDLE_WINDOW); | ||
| 4340 | method = window_class.window_updated; | ||
| 4341 | |||
| 4342 | (*android_java_env)->CallVoidMethod (android_java_env, object, | ||
| 4343 | method, (jlong) serial); | ||
| 4344 | android_exception_check (); | ||
| 4345 | } | ||
| 4346 | |||
| 4347 | 4326 | ||
| 4348 | 4327 | ||
| 4349 | /* When calling the system's faccessat, make sure to clear the flag | 4328 | /* When calling the system's faccessat, make sure to clear the flag |
diff --git a/src/android.h b/src/android.h index da5c4379800..9006f5f34c5 100644 --- a/src/android.h +++ b/src/android.h | |||
| @@ -88,7 +88,6 @@ extern void android_exception_check (void); | |||
| 88 | extern void android_get_keysym_name (int, char *, size_t); | 88 | extern void android_get_keysym_name (int, char *, size_t); |
| 89 | extern void android_wait_event (void); | 89 | extern void android_wait_event (void); |
| 90 | extern void android_toggle_on_screen_keyboard (android_window, bool); | 90 | extern void android_toggle_on_screen_keyboard (android_window, bool); |
| 91 | extern void android_window_updated (android_window, unsigned long); | ||
| 92 | extern _Noreturn void android_restart_emacs (void); | 91 | extern _Noreturn void android_restart_emacs (void); |
| 93 | extern int android_get_current_api_level (void); | 92 | extern int android_get_current_api_level (void); |
| 94 | 93 | ||
diff --git a/src/androidterm.c b/src/androidterm.c index d5dafe9b0d7..4aee1a90b68 100644 --- a/src/androidterm.c +++ b/src/androidterm.c | |||
| @@ -591,17 +591,7 @@ handle_one_android_event (struct android_display_info *dpyinfo, | |||
| 591 | android_clear_under_internal_border (f); | 591 | android_clear_under_internal_border (f); |
| 592 | SET_FRAME_GARBAGED (f); | 592 | SET_FRAME_GARBAGED (f); |
| 593 | cancel_mouse_face (f); | 593 | cancel_mouse_face (f); |
| 594 | |||
| 595 | /* Now stash the serial of this configure event somewhere, | ||
| 596 | and call android_window_updated with it once the redraw | ||
| 597 | completes. */ | ||
| 598 | FRAME_OUTPUT_DATA (f)->last_configure_serial | ||
| 599 | = configureEvent.xconfigure.serial; | ||
| 600 | } | 594 | } |
| 601 | else | ||
| 602 | /* Reply to this ConfigureNotify event immediately. */ | ||
| 603 | android_window_updated (FRAME_ANDROID_WINDOW (f), | ||
| 604 | configureEvent.xconfigure.serial); | ||
| 605 | 595 | ||
| 606 | goto OTHER; | 596 | goto OTHER; |
| 607 | 597 | ||
| @@ -1352,14 +1342,6 @@ android_frame_up_to_date (struct frame *f) | |||
| 1352 | /* The frame is now complete, as its contents have been drawn. */ | 1342 | /* The frame is now complete, as its contents have been drawn. */ |
| 1353 | FRAME_ANDROID_COMPLETE_P (f) = true; | 1343 | FRAME_ANDROID_COMPLETE_P (f) = true; |
| 1354 | 1344 | ||
| 1355 | /* If there was an outstanding configure event, then tell system | ||
| 1356 | that the update has finished and the new contents can now be | ||
| 1357 | displayed. */ | ||
| 1358 | if (FRAME_OUTPUT_DATA (f)->last_configure_serial) | ||
| 1359 | android_window_updated (FRAME_ANDROID_WINDOW (f), | ||
| 1360 | FRAME_OUTPUT_DATA (f)->last_configure_serial); | ||
| 1361 | FRAME_OUTPUT_DATA (f)->last_configure_serial = 0; | ||
| 1362 | |||
| 1363 | /* Shrink the scanline buffer used by the font backend. */ | 1345 | /* Shrink the scanline buffer used by the font backend. */ |
| 1364 | sfntfont_android_shrink_scanline_buffer (); | 1346 | sfntfont_android_shrink_scanline_buffer (); |
| 1365 | unblock_input (); | 1347 | unblock_input (); |
diff --git a/src/androidterm.h b/src/androidterm.h index 8cc31f1ab57..ac845187a66 100644 --- a/src/androidterm.h +++ b/src/androidterm.h | |||
| @@ -241,11 +241,6 @@ struct android_output | |||
| 241 | /* List of all tools (either styluses or fingers) pressed onto the | 241 | /* List of all tools (either styluses or fingers) pressed onto the |
| 242 | frame. */ | 242 | frame. */ |
| 243 | struct android_touch_point *touch_points; | 243 | struct android_touch_point *touch_points; |
| 244 | |||
| 245 | /* Event serial of the last ConfigureNotify event received that has | ||
| 246 | not yet been drawn. This is used to synchronize resize with the | ||
| 247 | window system. 0 if no such outstanding event exists. */ | ||
| 248 | unsigned long last_configure_serial; | ||
| 249 | }; | 244 | }; |
| 250 | 245 | ||
| 251 | enum | 246 | enum |