jdk/src/share/classes/java/awt/Dialog.java
changeset 12645 e0d32945f6ab
parent 9202 164591974d77
child 12661 6cf8b7116579
equal deleted inserted replaced
12644:087eca2f351b 12645:e0d32945f6ab
  1035             Component predictedFocusOwner = null;
  1035             Component predictedFocusOwner = null;
  1036             try {
  1036             try {
  1037                 predictedFocusOwner = getMostRecentFocusOwner();
  1037                 predictedFocusOwner = getMostRecentFocusOwner();
  1038                 if (conditionalShow(predictedFocusOwner, time)) {
  1038                 if (conditionalShow(predictedFocusOwner, time)) {
  1039                     modalFilter = ModalEventFilter.createFilterForDialog(this);
  1039                     modalFilter = ModalEventFilter.createFilterForDialog(this);
  1040                     Conditional cond = new Conditional() {
  1040                     final Conditional cond = new Conditional() {
  1041                         @Override
  1041                         @Override
  1042                         public boolean evaluate() {
  1042                         public boolean evaluate() {
  1043                             return windowClosingException == null;
  1043                             return windowClosingException == null;
  1044                         }
  1044                         }
  1045                     };
  1045                     };
  1065                         }
  1065                         }
  1066                     }
  1066                     }
  1067 
  1067 
  1068                     modalityPushed();
  1068                     modalityPushed();
  1069                     try {
  1069                     try {
  1070                         EventQueue eventQueue = Toolkit.getDefaultToolkit().getSystemEventQueue();
  1070                         final EventQueue eventQueue = AccessController.doPrivileged(
       
  1071                             new PrivilegedAction<EventQueue>() {
       
  1072                                 public EventQueue run() {
       
  1073                                     return Toolkit.getDefaultToolkit().getSystemEventQueue();
       
  1074                                 }
       
  1075                         });
  1071                         secondaryLoop = eventQueue.createSecondaryLoop(cond, modalFilter, 0);
  1076                         secondaryLoop = eventQueue.createSecondaryLoop(cond, modalFilter, 0);
  1072                         if (!secondaryLoop.enter()) {
  1077                         if (!secondaryLoop.enter()) {
  1073                             secondaryLoop = null;
  1078                             secondaryLoop = null;
  1074                         }
  1079                         }
  1075                     } finally {
  1080                     } finally {