An example how to control on which monitor does processing applet (sketch output window) appear if you’re using multi-head setup:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
// send the main window to another display // do an "export $DISPLAY=":0" if running remotely static final void main(String[] args) { String sketch = Thread.currentThread() .getStackTrace()[1].getClassName(); main(sketch, args , "--display=1" ); } static final void main(String name, String[] oldArgs, String... newArgs) { runSketch(concat(append(newArgs, name), oldArgs), null); } // undecorate window public void init() { frame.removeNotify(); frame.setUndecorated(true); frame.addNotify(); super.init(); } void setup() { // set size of the window & renderer size( // 1280,720, 1920,1080, P3D); background(50); frameRate(60); } void draw() { noStroke(); if (frameCount % 20 == 1) { fill(255); } else { fill(0); } rect(width*0.025, height*0.025, width * 0.95, height * 0.95); } |