提交 6b860cd3 编写于 作者: A ant

8024839: [Unified Swing/Fx threading] don't schedule an event dispatching from...

8024839: [Unified Swing/Fx threading] don't schedule an event dispatching from the event dispatch thread
Reviewed-by: anthony, pchelko
上级 007f04d2
...@@ -690,7 +690,10 @@ public class EventQueue { ...@@ -690,7 +690,10 @@ public class EventQueue {
final Object src = event.getSource(); final Object src = event.getSource();
final PrivilegedAction<Void> action = new PrivilegedAction<Void>() { final PrivilegedAction<Void> action = new PrivilegedAction<Void>() {
public Void run() { public Void run() {
if (fwDispatcher == null) { // In case fwDispatcher is installed and we're already on the
// dispatch thread (e.g. performing DefaultKeyboardFocusManager.sendMessage),
// dispatch the event straight away.
if (fwDispatcher == null || isDispatchThreadImpl()) {
dispatchEventImpl(event, src); dispatchEventImpl(event, src);
} else { } else {
fwDispatcher.scheduleDispatch(new Runnable() { fwDispatcher.scheduleDispatch(new Runnable() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册