src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m
changeset 58597 4ff14948c6a1
parent 54865 99337f94b04d
--- a/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m	Mon Sep 30 22:36:03 2019 -0700
+++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m	Tue Oct 01 10:28:12 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -831,3 +831,19 @@
     }
     return JNI_FALSE;
 }
+
+/*
+ * Class:     sun_lwawt_macosx_LWCToolkit
+ * Method:    getMultiClickTime
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL
+Java_sun_lwawt_macosx_LWCToolkit_getMultiClickTime(JNIEnv *env, jclass klass) {
+    __block jint multiClickTime = 0;
+    JNF_COCOA_ENTER(env);
+    [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
+        multiClickTime = (jint)([NSEvent doubleClickInterval] * 1000);
+    }];
+    JNF_COCOA_EXIT(env);
+    return multiClickTime;
+}