Hide the menu bar, make the Frame undecorated, set it to screenRect.
()
| 838 | |
| 839 | /** Hide the menu bar, make the Frame undecorated, set it to screenRect. */ |
| 840 | private void setFullFrame() { |
| 841 | // Called here because the graphics device is needed before we can |
| 842 | // determine whether the sketch wants size(displayWidth, displayHeight), |
| 843 | // and getting the graphics device will be PSurface-specific. |
| 844 | PApplet.hideMenuBar(); |
| 845 | |
| 846 | // Tried to use this to fix the 'present' mode issue. |
| 847 | // Did not help, and the screenRect setup seems to work fine. |
| 848 | //frame.setExtendedState(Frame.MAXIMIZED_BOTH); |
| 849 | |
| 850 | // https://github.com/processing/processing/pull/3162 |
| 851 | //frame.dispose(); // release native resources, allows setUndecorated() |
| 852 | frame.removeNotify(); |
| 853 | frame.setUndecorated(true); |
| 854 | frame.addNotify(); |
| 855 | |
| 856 | // this may be the bounds of all screens |
| 857 | frame.setBounds(screenRect); |
| 858 | // will be set visible in placeWindow() [3.0a10] |
| 859 | //frame.setVisible(true); // re-add native resources |
| 860 | } |
| 861 | |
| 862 | |
| 863 | @Override |
no test coverage detected