On macOS the system animates the transition into and out of fullscreen and this 
animation runs asynchronously. JavaFX tries to make the setFullScreen call 
appear synchronous by running a nested event loop while the transition is going 
on. But this means that runLater runnables can fire during a call to 
setFullScreen.

This can also occur during a call to Window.hide() if the window is in 
fullscreen mode. During the setView call glass tries to take the window out of 
fullscreen mode which fires up a nested event loop and, again, runLater 
runnables (like pulses) start firing.

In this PR GlassRunnables that try to run during the fullscreen transition are 
instead placed in a deferral list. When the fullscreen event loop exits they 
are re-scheduled.

-------------

Commit messages:
 - runLater runnables deferred while fullscreen nested event loop is running

Changes: https://git.openjdk.org/jfx/pull/1797/files
  Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1797&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8176813
  Stats: 31 lines in 3 files changed: 25 ins; 4 del; 2 mod
  Patch: https://git.openjdk.org/jfx/pull/1797.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/1797/head:pull/1797

PR: https://git.openjdk.org/jfx/pull/1797

Reply via email to