equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
963 jobject platformWindow = [self.javaPlatformWindow jObjectWithEnv:env]; |
963 jobject platformWindow = [self.javaPlatformWindow jObjectWithEnv:env]; |
964 if (platformWindow != NULL) { |
964 if (platformWindow != NULL) { |
965 // Currently, no need to deliver the whole NSEvent. |
965 // Currently, no need to deliver the whole NSEvent. |
966 static JNF_MEMBER_CACHE(jm_deliverNCMouseDown, jc_CPlatformWindow, "deliverNCMouseDown", "()V"); |
966 static JNF_MEMBER_CACHE(jm_deliverNCMouseDown, jc_CPlatformWindow, "deliverNCMouseDown", "()V"); |
967 JNFCallVoidMethod(env, platformWindow, jm_deliverNCMouseDown); |
967 JNFCallVoidMethod(env, platformWindow, jm_deliverNCMouseDown); |
968 // Deliver double click on title bar |
|
969 if ([event clickCount] > 1) { |
|
970 static JNF_MEMBER_CACHE(jm_deliverDoubleClickOnTitlebar, jc_CPlatformWindow, "deliverDoubleClickOnTitlebar", "()V"); |
|
971 JNFCallVoidMethod(env, platformWindow, jm_deliverDoubleClickOnTitlebar); |
|
972 } |
|
973 (*env)->DeleteLocalRef(env, platformWindow); |
968 (*env)->DeleteLocalRef(env, platformWindow); |
974 } |
969 } |
975 } |
970 } |
976 } |
971 } |
977 } |
972 } |