|
@@ -39,6 +39,7 @@ import java.awt.event.KeyEvent;
|
39
|
39
|
import java.awt.event.MouseEvent;
|
40
|
40
|
|
41
|
41
|
import java.awt.event.WindowEvent;
|
|
42
|
+import java.util.concurrent.atomic.AtomicReference;
|
42
|
43
|
import javax.swing.JPopupMenu;
|
43
|
44
|
import javax.swing.KeyStroke;
|
44
|
45
|
import javax.swing.MenuSelectionManager;
|
|
@@ -78,9 +79,13 @@ public final class DMDircEventQueue extends EventQueue implements
|
78
|
79
|
if (tracingThread == null) {
|
79
|
80
|
super.dispatchEvent(event);
|
80
|
81
|
} else {
|
81
|
|
- this.tracingThread.eventDispatched(event);
|
|
82
|
+ if (tracingThread != null) {
|
|
83
|
+ tracingThread.eventDispatched(event);
|
|
84
|
+ }
|
82
|
85
|
super.dispatchEvent(event);
|
83
|
|
- this.tracingThread.eventProcessed(event);
|
|
86
|
+ if (tracingThread != null) {
|
|
87
|
+ tracingThread.eventProcessed(event);
|
|
88
|
+ }
|
84
|
89
|
}
|
85
|
90
|
|
86
|
91
|
if (event instanceof MouseEvent) {
|
|
@@ -96,10 +101,13 @@ public final class DMDircEventQueue extends EventQueue implements
|
96
|
101
|
final boolean tracing = IdentityManager.getGlobalConfig().
|
97
|
102
|
getOptionBool(controller.getDomain(), "debugEDT");
|
98
|
103
|
if (tracing) {
|
99
|
|
- this.tracingThread = new TracingEventQueueThread(100);
|
100
|
|
- this.tracingThread.start();
|
|
104
|
+ tracingThread = new TracingEventQueueThread(100);
|
|
105
|
+ tracingThread.start();
|
101
|
106
|
} else {
|
102
|
|
- tracingThread = null;
|
|
107
|
+ if (tracingThread != null) {
|
|
108
|
+ tracingThread.cancel();
|
|
109
|
+ tracingThread = null;
|
|
110
|
+ }
|
103
|
111
|
}
|
104
|
112
|
}
|
105
|
113
|
|