1259 // visible children. 1260 if (!iconified) { 1261 childWindows.addAll(Arrays.asList(windowAccessor.getOwnedWindows(w))); 1262 } 1263 } 1264 // If some windows, which have just been ordered, have any child windows, let's start new iteration 1265 // and order these child windows. 1266 if (!childWindows.isEmpty()) { 1267 orderAboveSiblingsImpl(childWindows.toArray(new Window[0])); 1268 } 1269 } 1270 1271 protected void applyWindowLevel(Window target) { 1272 if (target.isAlwaysOnTop() && target.getType() != Window.Type.POPUP) { 1273 execute(ptr->CWrapper.NSWindow.setLevel(ptr, CWrapper.NSWindow.NSFloatingWindowLevel)); 1274 } else if (target.getType() == Window.Type.POPUP) { 1275 execute(ptr->CWrapper.NSWindow.setLevel(ptr, CWrapper.NSWindow.NSPopUpMenuWindowLevel)); 1276 } 1277 } 1278 1279 // ---------------------------------------------------------------------- 1280 // NATIVE CALLBACKS 1281 // ---------------------------------------------------------------------- 1282 1283 private void windowWillMiniaturize() { 1284 isIconifyAnimationActive = true; 1285 } 1286 1287 private void windowDidBecomeMain() { 1288 lastBecomeMainTime = System.currentTimeMillis(); 1289 if (checkBlockingAndOrder()) return; 1290 // If it's not blocked, make sure it's above its siblings 1291 orderAboveSiblings(); 1292 } 1293 1294 private void windowWillEnterFullScreen() { 1295 isFullScreenAnimationOn = true; 1296 } 1297 1298 private void windowDidEnterFullScreen() { | 1259 // visible children. 1260 if (!iconified) { 1261 childWindows.addAll(Arrays.asList(windowAccessor.getOwnedWindows(w))); 1262 } 1263 } 1264 // If some windows, which have just been ordered, have any child windows, let's start new iteration 1265 // and order these child windows. 1266 if (!childWindows.isEmpty()) { 1267 orderAboveSiblingsImpl(childWindows.toArray(new Window[0])); 1268 } 1269 } 1270 1271 protected void applyWindowLevel(Window target) { 1272 if (target.isAlwaysOnTop() && target.getType() != Window.Type.POPUP) { 1273 execute(ptr->CWrapper.NSWindow.setLevel(ptr, CWrapper.NSWindow.NSFloatingWindowLevel)); 1274 } else if (target.getType() == Window.Type.POPUP) { 1275 execute(ptr->CWrapper.NSWindow.setLevel(ptr, CWrapper.NSWindow.NSPopUpMenuWindowLevel)); 1276 } 1277 } 1278 1279 private Window getOwnerFrameOrDialog(Window window) { 1280 Window owner = window.getOwner(); 1281 while(owner != null && !(owner instanceof Frame || owner instanceof Dialog)) { 1282 owner = owner.getOwner(); 1283 } 1284 return owner; 1285 } 1286 1287 private boolean isSimpleWindowOwnedByEmbeddedFrame() { 1288 if (peer != null && peer.isSimpleWindow()) { 1289 return (getOwnerFrameOrDialog(target) instanceof CEmbeddedFrame); 1290 } 1291 return false; 1292 } 1293 1294 // ---------------------------------------------------------------------- 1295 // NATIVE CALLBACKS 1296 // ---------------------------------------------------------------------- 1297 1298 private void windowWillMiniaturize() { 1299 isIconifyAnimationActive = true; 1300 } 1301 1302 private void windowDidBecomeMain() { 1303 lastBecomeMainTime = System.currentTimeMillis(); 1304 if (checkBlockingAndOrder()) return; 1305 // If it's not blocked, make sure it's above its siblings 1306 orderAboveSiblings(); 1307 } 1308 1309 private void windowWillEnterFullScreen() { 1310 isFullScreenAnimationOn = true; 1311 } 1312 1313 private void windowDidEnterFullScreen() { |