Hide the menu bar, make the Frame undecorated, set it to screenRect.
()
| 692 | |
| 693 | /** Hide the menu bar, make the Frame undecorated, set it to screenRect. */ |
| 694 | private void setFullFrame() { |
| 695 | // Called here because the graphics device is needed before we can |
| 696 | // determine whether the sketch wants size(displayWidth, displayHeight), |
| 697 | // and getting the graphics device will be PSurface-specific. |
| 698 | PApplet.hideMenuBar(); |
| 699 | |
| 700 | // Tried to use this to fix the 'present' mode issue. |
| 701 | // Did not help, and the screenRect setup seems to work fine. |
| 702 | //frame.setExtendedState(Frame.MAXIMIZED_BOTH); |
| 703 | |
| 704 | // https://github.com/processing/processing/pull/3162 |
| 705 | //frame.dispose(); // release native resources, allows setUndecorated() |
| 706 | frame.removeNotify(); |
| 707 | frame.setUndecorated(true); |
| 708 | frame.addNotify(); |
| 709 | |
| 710 | // this may be the bounds of all screens |
| 711 | frame.setBounds(screenRect); |
| 712 | // will be set visible in placeWindow() [3.0a10] |
| 713 | //frame.setVisible(true); // re-add native resources |
| 714 | } |
| 715 | |
| 716 | |
| 717 | @Override |
no test coverage detected