diff --git a/processing/app/KjcEngine.java b/processing/app/KjcEngine.java index a6197adb9..12ee69b67 100644 --- a/processing/app/KjcEngine.java +++ b/processing/app/KjcEngine.java @@ -661,6 +661,7 @@ public class KjcEngine extends PdeEngine { window = new Window(new Frame()); window.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent e) { + //System.out.println("window got " + e); if (e.getKeyCode() == KeyEvent.VK_ESCAPE) { //editor.doClose(); //new DelayedClose(editor); @@ -691,6 +692,7 @@ public class KjcEngine extends PdeEngine { applet.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent e) { + //System.out.println("applet got " + e); if (e.getKeyCode() == KeyEvent.VK_ESCAPE) { stop(); editor.doClose(); diff --git a/processing/app/PdeBase.java b/processing/app/PdeBase.java index 5a8835c40..a29cb4c80 100644 --- a/processing/app/PdeBase.java +++ b/processing/app/PdeBase.java @@ -85,7 +85,12 @@ public class PdeBase implements ActionListener { } public PdeBase() { - frame = new Frame(WINDOW_TITLE); + frame = new Frame(WINDOW_TITLE) { + // hack for #@#)$(* macosx + public Dimension getMinimumSize() { + return new Dimension(300, 300); + } + }; try { icon = Toolkit.getDefaultToolkit().getImage("lib/icon.gif"); @@ -282,6 +287,8 @@ public class PdeBase implements ActionListener { //((PdeEditor)environment).frame = frame frame.pack(); // maybe this should be before the setBounds call + //System.out.println(frame.getMinimumSize() + " " + frame.getSize()); + editor.frame = frame; // no longer really used editor.init(); rebuildSketchbookMenu(sketchbookMenu); diff --git a/processing/app/PdeEditor.java b/processing/app/PdeEditor.java index 9f9940d20..d9b3b87e6 100644 --- a/processing/app/PdeEditor.java +++ b/processing/app/PdeEditor.java @@ -115,6 +115,24 @@ public class PdeEditor extends Panel { PdeBase.getInteger("editor.program.rows", 20), PdeBase.getInteger("editor.program.columns", 60), TextArea.SCROLLBARS_VERTICAL_ONLY); + + /* { + public Dimension minimumSize() { + System.out.println("old minimum"); + return new Dimension(100, 100); + } + + public Dimension getMinimumSize() { + System.out.println("new minimum"); + return new Dimension(100, 100); + } + + public Dimension getMinimumSize(int r, int c) { + System.out.println("new minimum 2"); + return new Dimension(100, 100); + } + };*/ + textarea.setFont(PdeBase.getFont("editor.program.font", new Font("Monospaced", Font.PLAIN, 12))); @@ -166,6 +184,11 @@ public class PdeEditor extends Panel { } else { presentationWindow = new Window(new Frame()); presentationWindow.setBounds(0, 0, screen.width, screen.height); + //presentationWindow.addKeyListener(new KeyAdapter() { + // public void keyPressed(KeyEvent e) { + // System.out.println("pwindow got " + e); + // } + //}); } Label label = new Label("stop"); diff --git a/processing/build/macosx/dist/lib/pde_macosx.properties b/processing/build/macosx/dist/lib/pde_macosx.properties index e69de29bb..a9b728b12 100644 --- a/processing/build/macosx/dist/lib/pde_macosx.properties +++ b/processing/build/macosx/dist/lib/pde_macosx.properties @@ -0,0 +1,2 @@ +# osx makes things a little large by default +editor.program.font = Monospaced,plain,10