void (@Nullable Project project, boolean inPresentation) { storeToolWindows(project); log(String.format("Will tweak full screen mode for presentation=%b", inPresentation)); UISettings.getInstance().setPresentationMode(inPresentation); float oldScale = UISettingsUtils.getInstance().getCurrentIdeScale(); UISettings.getInstance().fireUISettingsChanged(); // If IDE scale hasn't been changed, we need to updateUI here if (oldScale == UISettingsUtils.getInstance().getCurrentIdeScale()) { LafManager.getInstance().updateUI(); } Job callback = project == null ? CompletableDeferredKt.CompletableDeferred(Unit.INSTANCE) : tweakFrameFullScreen(project, inPresentation); callback.invokeOnCompletion(__ -> { SwingUtilities.invokeLater(() -> restoreToolWindows(project)); return Unit.INSTANCE; }); }