diff options
| author | Po Lu | 2023-03-18 10:54:26 +0800 |
|---|---|---|
| committer | Po Lu | 2023-03-18 10:54:26 +0800 |
| commit | 634e3fcc20ea9fa5b1af59286f4b846a351f52c8 (patch) | |
| tree | 2a98eff1365c2776f53c163e58cd539d1a65ba87 /src/androidterm.c | |
| parent | 773bdb15abd5527dfc27d811a70263ac10cf451b (diff) | |
| download | emacs-634e3fcc20ea9fa5b1af59286f4b846a351f52c8.tar.gz emacs-634e3fcc20ea9fa5b1af59286f4b846a351f52c8.zip | |
Update Android port
* java/org/gnu/emacs/EmacsView.java (EmacsView)
(prepareForLayout): New function. Call this prior to mapping
the view.
(onGlobalLayout): New function. Register as global layout
listener.
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow)
(notifyContentRectPosition): New function. Use specified
xPosition and yPosition when reporting the offsets of children
of the root window.
* java/org/gnu/emacs/EmacsWindowAttachmentManager.java
(registerWindow): Specify activity launch bounds if necessary.
* src/androidterm.c (handle_one_android_event): Send
MOVE_FRAME_EVENT where necessary.
Diffstat (limited to 'src/androidterm.c')
| -rw-r--r-- | src/androidterm.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/androidterm.c b/src/androidterm.c index 1cf9bc4afde..825d6da60fa 100644 --- a/src/androidterm.c +++ b/src/androidterm.c | |||
| @@ -787,6 +787,33 @@ handle_one_android_event (struct android_display_info *dpyinfo, | |||
| 787 | cancel_mouse_face (f); | 787 | cancel_mouse_face (f); |
| 788 | } | 788 | } |
| 789 | 789 | ||
| 790 | /* Now change the left and top position of this window. */ | ||
| 791 | |||
| 792 | { | ||
| 793 | int old_left = f->left_pos; | ||
| 794 | int old_top = f->top_pos; | ||
| 795 | Lisp_Object frame; | ||
| 796 | |||
| 797 | XSETFRAME (frame, f); | ||
| 798 | |||
| 799 | { | ||
| 800 | android_window root; | ||
| 801 | unsigned int dummy_uint; | ||
| 802 | |||
| 803 | android_get_geometry (FRAME_ANDROID_WINDOW (f), | ||
| 804 | &root, &f->left_pos, &f->top_pos, | ||
| 805 | &dummy_uint, &dummy_uint, | ||
| 806 | &dummy_uint); | ||
| 807 | } | ||
| 808 | |||
| 809 | if (!FRAME_TOOLTIP_P (f) | ||
| 810 | && (old_left != f->left_pos || old_top != f->top_pos)) | ||
| 811 | { | ||
| 812 | inev.ie.kind = MOVE_FRAME_EVENT; | ||
| 813 | XSETFRAME (inev.ie.frame_or_window, f); | ||
| 814 | } | ||
| 815 | } | ||
| 816 | |||
| 790 | goto OTHER; | 817 | goto OTHER; |
| 791 | 818 | ||
| 792 | case ANDROID_KEY_PRESS: | 819 | case ANDROID_KEY_PRESS: |
| @@ -1100,6 +1127,11 @@ handle_one_android_event (struct android_display_info *dpyinfo, | |||
| 1100 | 1127 | ||
| 1101 | if (!FRAME_GARBAGED_P (f)) | 1128 | if (!FRAME_GARBAGED_P (f)) |
| 1102 | { | 1129 | { |
| 1130 | __android_log_print (ANDROID_LOG_VERBOSE, __func__, | ||
| 1131 | "expose: %d %d %d %d\n", | ||
| 1132 | event->xexpose.x, event->xexpose.y, | ||
| 1133 | event->xexpose.width, | ||
| 1134 | event->xexpose.height); | ||
| 1103 | expose_frame (f, event->xexpose.x, event->xexpose.y, | 1135 | expose_frame (f, event->xexpose.x, event->xexpose.y, |
| 1104 | event->xexpose.width, event->xexpose.height); | 1136 | event->xexpose.width, event->xexpose.height); |
| 1105 | show_back_buffer (f); | 1137 | show_back_buffer (f); |