< prev index next >
src/java.desktop/share/classes/sun/awt/dnd/SunDragSourceContextPeer.java
Print this page
rev 58521 : 7185258: [macosx] Deadlock in SunToolKit.realSync()
Reviewed-by: XXX
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2020, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -72,11 +72,11 @@
private Point dragImageOffset;
private long nativeCtxt;
private DragSourceContext dragSourceContext;
private int sourceActions;
- private static boolean dragDropInProgress = false;
+ private static volatile boolean dragDropInProgress = false;
private static boolean discardingMouseEvents = false;
/*
* dispatch constants
*/
@@ -379,10 +379,14 @@
if (dragDropInProgress) {
throw new InvalidDnDOperationException(getExceptionMessage(true));
}
}
+ public static boolean isDragDropInProgress() {
+ return dragDropInProgress;
+ }
+
private static String getExceptionMessage(boolean b) {
return b ? "Drag and drop in progress" : "No drag in progress";
}
public static int convertModifiersToDropAction(final int modifiers,
< prev index next >