--- old/src/java.desktop/macosx/classes/sun/awt/CGraphicsDevice.java 2020-08-23 15:07:55.000000000 -0700 +++ new/src/java.desktop/macosx/classes/sun/awt/CGraphicsDevice.java 2020-08-23 15:07:54.000000000 -0700 @@ -131,9 +131,14 @@ return scale; } - public void invalidate(final int defaultDisplayID) { + /** + * Invalidates this device so it will point to some other "new" device. + * + * @param device the new device, usually the main screen + */ + public void invalidate(CGraphicsDevice device) { //TODO do we need to restore the full-screen window/modes on old device? - displayID = defaultDisplayID; + displayID = device.displayID; } @Override