]> git.eshelyaron.com Git - emacs.git/commitdiff
Update Android port
authorPo Lu <luangruo@yahoo.com>
Fri, 17 Mar 2023 02:38:09 +0000 (10:38 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 17 Mar 2023 02:38:09 +0000 (10:38 +0800)
* java/org/gnu/emacs/EmacsView.java (cancelPopupMenu): Dismiss
context menu correctly.
(isOpaque): New function.
* java/org/gnu/emacs/EmacsWindowAttachmentManager.java: Make
consumer list public.

java/org/gnu/emacs/EmacsView.java
java/org/gnu/emacs/EmacsWindowAttachmentManager.java

index 878ef2f3fbfdcf35a70663a4f52bfe457ca6e391..681da98fa16748e617b01c9ebb904cd3a538055b 100644 (file)
@@ -514,6 +514,17 @@ public final class EmacsView extends ViewGroup
 
     contextMenu = null;
     popupActive = false;
+
+    /* It is not possible to know with 100% certainty which activity
+       is currently displaying the context menu.  Loop through each
+       activity and call `closeContextMenu' instead.  */
+
+    for (EmacsWindowAttachmentManager.WindowConsumer consumer
+          : EmacsWindowAttachmentManager.MANAGER.consumers)
+      {
+       if (consumer instanceof EmacsActivity)
+         ((EmacsActivity) consumer).closeContextMenu ();
+      }
   }
 
   @Override
@@ -646,6 +657,16 @@ public final class EmacsView extends ViewGroup
     return isCurrentlyTextEditor;
   }
 
+  @Override
+  public boolean
+  isOpaque ()
+  {
+    /* Returning true here allows the system to not draw the contents
+       of windows underneath this view, thereby improving
+       performance.  */
+    return true;
+  }
+
   public synchronized void
   setICMode (int icMode)
   {
index 30f29250970700500ad63d2edc01c05a231bf436..c0197ab802c6ef7403ae8e601cab9256e43ddc8c 100644 (file)
@@ -67,7 +67,7 @@ public final class EmacsWindowAttachmentManager
     public void destroy ();
   };
 
-  private List<WindowConsumer> consumers;
+  public List<WindowConsumer> consumers;
   public List<EmacsWindow> windows;
 
   public