]> git.eshelyaron.com Git - emacs.git/commitdiff
* java/org/gnu/emacs/EmacsContextMenu.java (display): Reduce timeout.
authorPo Lu <luangruo@yahoo.com>
Wed, 21 Feb 2024 13:49:35 +0000 (21:49 +0800)
committerEshel Yaron <me@eshelyaron.com>
Wed, 28 Feb 2024 17:37:40 +0000 (18:37 +0100)
(cherry picked from commit 0a4d4781ddc079509cb256edf803d663439dcf92)

java/org/gnu/emacs/EmacsContextMenu.java

index f1d70f05a25982230f28ae4ec880ca4db08b49a4..2bbf2a313d655c0dd7249cb3a63ebce1c11d169f 100644 (file)
@@ -367,16 +367,15 @@ public final class EmacsContextMenu
          rc = display1 (window, xPosition, yPosition);
 
          /* Android 3.0 to Android 7.0 perform duplicate calls to
-            onContextMenuClosed after a context menu is dismissed for
-            the second or third time.  Since the second call after such
-            a dismissal is otherwise liable to prematurely cancel any
-            context menu displayed immediately afterwards, ignore calls
-            received within 300 milliseconds of this menu's being
-            displayed.  */
+            onContextMenuClosed the second time a context menu is
+            dismissed.  Since the second call after such a dismissal is
+            otherwise liable to prematurely cancel any context menu
+            displayed immediately afterwards, ignore calls received
+            within 150 milliseconds of this menu's being displayed.  */
 
          if (rc && Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB
              && Build.VERSION.SDK_INT < Build.VERSION_CODES.N)
-           wasSubmenuSelected = System.currentTimeMillis ();
+           wasSubmenuSelected = System.currentTimeMillis () - 150;
 
          return rc;
        }