Add ability to maximize the window initially
I am using Processing 3.0.1 and since we don't have (easy) access to the underlying AWT window, it seems impossible for me to start a new sketch (which I am using from withing a standalone Eclipse Java project) maximized.
I came closest with (the hacky):
private void maximized() { try { final GLWindow window = (GLWindow) getSurface().getNative(); window.getScreen().getDisplay().getEDTUtil().invoke(false, new Runnable() { @Override public void run() { window.setMaximized(true, true); // both horizontal and vertical } }); } catch (Exception e) { System.err.println("Could not make window maximized"); } }
which I call inside setup() (it does not work inside settings() at all as there is no window yet).
It does start non-maximized, and after a short time the window is maximized, but this looks really not good and also is very non-portable since it depends on the JOGL renderer.
Since using fullScreen() inside settings() works perfectly, it would be great, if we had a maximized() method which can also be called in settings() and does the expected thing.