@@ -387,7 +387,7 @@ public Component initComponent(PApplet sketch) {
387387
388388
389389 @ Override
390- public Frame initFrame (PApplet sketch , Color backgroundColor ,
390+ public void initFrame (PApplet sketch , Color backgroundColor ,
391391 int deviceIndex , boolean fullScreen , boolean spanDisplays ) {
392392 this .sketch = sketch ;
393393
@@ -514,46 +514,49 @@ public Frame initFrame(PApplet sketch, Color backgroundColor,
514514 // http://code.google.com/p/processing/issues/detail?id=467
515515 frame .setResizable (false );
516516
517- return frame ;
517+ // return frame;
518518 }
519519
520520
521- // /** Set the window (and dock, or whatever necessary) title. */
522- // public void setTitle(String title) {
523- // frame.setTitle(title);
524- // }
525- //
526- //
527- // /** Set true if we want to resize things (default is not resizable) */
528- // public void setResizable(boolean resizable) {
529- // this.resizable = resizable; // really only used for canvas
530- //
531- // if (frame != null) {
532- // frame.setResizable(resizable);
533- // }
534- // }
535- //
536- //
537- // public void setVisible(boolean visible) {
538- // frame.setVisible(visible);
539- //
540- // // removing per https://github.com/processing/processing/pull/3162
541- // // can remove the code below once 3.0a6 is tested and behaving
542- ///*
543- // if (visible && PApplet.platform == PConstants.LINUX) {
544- // // Linux doesn't deal with insets the same way. We get fake insets
545- // // earlier, and then the window manager will slap its own insets
546- // // onto things once the frame is realized on the screen. Awzm.
547- // if (PApplet.platform == PConstants.LINUX) {
548- // Insets insets = frame.getInsets();
549- // frame.setSize(Math.max(sketchWidth, MIN_WINDOW_WIDTH) +
550- // insets.left + insets.right,
551- // Math.max(sketchHeight, MIN_WINDOW_HEIGHT) +
552- // insets.top + insets.bottom);
553- // }
554- // }
555- //*/
556- // }
521+ /** Set the window (and dock, or whatever necessary) title. */
522+ @ Override
523+ public void setTitle (String title ) {
524+ frame .setTitle (title );
525+ }
526+
527+
528+ /** Set true if we want to resize things (default is not resizable) */
529+ @ Override
530+ public void setResizable (boolean resizable ) {
531+ //this.resizable = resizable; // really only used for canvas
532+
533+ if (frame != null ) {
534+ frame .setResizable (resizable );
535+ }
536+ }
537+
538+
539+ @ Override
540+ public void setVisible (boolean visible ) {
541+ frame .setVisible (visible );
542+
543+ // removing per https://github.com/processing/processing/pull/3162
544+ // can remove the code below once 3.0a6 is tested and behaving
545+ /*
546+ if (visible && PApplet.platform == PConstants.LINUX) {
547+ // Linux doesn't deal with insets the same way. We get fake insets
548+ // earlier, and then the window manager will slap its own insets
549+ // onto things once the frame is realized on the screen. Awzm.
550+ if (PApplet.platform == PConstants.LINUX) {
551+ Insets insets = frame.getInsets();
552+ frame.setSize(Math.max(sketchWidth, MIN_WINDOW_WIDTH) +
553+ insets.left + insets.right,
554+ Math.max(sketchHeight, MIN_WINDOW_HEIGHT) +
555+ insets.top + insets.bottom);
556+ }
557+ }
558+ */
559+ }
557560
558561
559562 //public void placeFullScreen(boolean hideStop) {
0 commit comments