From 6af511ed4abe491196b376552c0036a164449fff Mon Sep 17 00:00:00 2001 From: Sam Pottinger Date: Mon, 25 Nov 2019 17:29:02 -0800 Subject: [PATCH] Remove the mac specific fullscreen option for setResizable. Swing now enables the fullscreen option on Mac when a JFrame has setResizable(true). This removes the deprected com.apple.eawt.FullScreenUtilities.setWindowCanFullScreen call for setResizable instead. Resolves #36. --- app/src/processing/app/ui/Editor.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/app/src/processing/app/ui/Editor.java b/app/src/processing/app/ui/Editor.java index 83e30235b..4e36a4a2b 100644 --- a/app/src/processing/app/ui/Editor.java +++ b/app/src/processing/app/ui/Editor.java @@ -391,18 +391,8 @@ public abstract class Editor extends JFrame implements RunnerListener { // Add a window listener to watch for changes to the files in the sketch addWindowFocusListener(new ChangeDetector(this)); - // Try to enable fancy fullscreen on OSX - if (Platform.isMacOS()) { - try { - Class util = Class.forName("com.apple.eawt.FullScreenUtilities"); - Class params[] = new Class[]{Window.class, Boolean.TYPE}; - Method method = util.getMethod("setWindowCanFullScreen", params); - method.invoke(util, this, true); - } catch (Exception e) { - Messages.loge("Could not enable OSX fullscreen", e); - } - } - + // Enable window resizing (which allows for full screen button) + setResizable(true); }