diff options
| author | Po Lu | 2023-03-17 10:38:09 +0800 |
|---|---|---|
| committer | Po Lu | 2023-03-17 10:38:09 +0800 |
| commit | da660a1ffa3218f8e6ec4dfd5422ca6c1ded38ae (patch) | |
| tree | 679b3932c0946059b69f5d654f93830ad122eb2b /java | |
| parent | b37bb4279c7541cac6596747ea0951e8f02462ec (diff) | |
| download | emacs-da660a1ffa3218f8e6ec4dfd5422ca6c1ded38ae.tar.gz emacs-da660a1ffa3218f8e6ec4dfd5422ca6c1ded38ae.zip | |
Update Android port
* java/org/gnu/emacs/EmacsView.java (cancelPopupMenu): Dismiss
context menu correctly.
(isOpaque): New function.
* java/org/gnu/emacs/EmacsWindowAttachmentManager.java: Make
consumer list public.
Diffstat (limited to 'java')
| -rw-r--r-- | java/org/gnu/emacs/EmacsView.java | 21 | ||||
| -rw-r--r-- | java/org/gnu/emacs/EmacsWindowAttachmentManager.java | 2 |
2 files changed, 22 insertions, 1 deletions
diff --git a/java/org/gnu/emacs/EmacsView.java b/java/org/gnu/emacs/EmacsView.java index 878ef2f3fbf..681da98fa16 100644 --- a/java/org/gnu/emacs/EmacsView.java +++ b/java/org/gnu/emacs/EmacsView.java | |||
| @@ -514,6 +514,17 @@ public final class EmacsView extends ViewGroup | |||
| 514 | 514 | ||
| 515 | contextMenu = null; | 515 | contextMenu = null; |
| 516 | popupActive = false; | 516 | popupActive = false; |
| 517 | |||
| 518 | /* It is not possible to know with 100% certainty which activity | ||
| 519 | is currently displaying the context menu. Loop through each | ||
| 520 | activity and call `closeContextMenu' instead. */ | ||
| 521 | |||
| 522 | for (EmacsWindowAttachmentManager.WindowConsumer consumer | ||
| 523 | : EmacsWindowAttachmentManager.MANAGER.consumers) | ||
| 524 | { | ||
| 525 | if (consumer instanceof EmacsActivity) | ||
| 526 | ((EmacsActivity) consumer).closeContextMenu (); | ||
| 527 | } | ||
| 517 | } | 528 | } |
| 518 | 529 | ||
| 519 | @Override | 530 | @Override |
| @@ -646,6 +657,16 @@ public final class EmacsView extends ViewGroup | |||
| 646 | return isCurrentlyTextEditor; | 657 | return isCurrentlyTextEditor; |
| 647 | } | 658 | } |
| 648 | 659 | ||
| 660 | @Override | ||
| 661 | public boolean | ||
| 662 | isOpaque () | ||
| 663 | { | ||
| 664 | /* Returning true here allows the system to not draw the contents | ||
| 665 | of windows underneath this view, thereby improving | ||
| 666 | performance. */ | ||
| 667 | return true; | ||
| 668 | } | ||
| 669 | |||
| 649 | public synchronized void | 670 | public synchronized void |
| 650 | setICMode (int icMode) | 671 | setICMode (int icMode) |
| 651 | { | 672 | { |
diff --git a/java/org/gnu/emacs/EmacsWindowAttachmentManager.java b/java/org/gnu/emacs/EmacsWindowAttachmentManager.java index 30f29250970..c0197ab802c 100644 --- a/java/org/gnu/emacs/EmacsWindowAttachmentManager.java +++ b/java/org/gnu/emacs/EmacsWindowAttachmentManager.java | |||
| @@ -67,7 +67,7 @@ public final class EmacsWindowAttachmentManager | |||
| 67 | public void destroy (); | 67 | public void destroy (); |
| 68 | }; | 68 | }; |
| 69 | 69 | ||
| 70 | private List<WindowConsumer> consumers; | 70 | public List<WindowConsumer> consumers; |
| 71 | public List<EmacsWindow> windows; | 71 | public List<EmacsWindow> windows; |
| 72 | 72 | ||
| 73 | public | 73 | public |