-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Original author: [email protected] (February 21, 2012 17:40:49)
This may be related to http://code.google.com/p/processing/issues/detail?id=71, but the bug's cause appears to be different.
The following sketch should display full-screen sketches on two displays:
package com.example.test;
import processing.core.PApplet;
public class MultiwindowTest extends PApplet {
public void setup() {
size(100, 100);
}
public void draw() {
fill(255, 0, 0);
rect(25, 25, 50, 50);
}
public static void main(String args[]) {
PApplet.main(new String[] { "--present", "--display=1", "com.example.test.MultiwindowTest" });
PApplet.main(new String[] { "--present", "--display=2", "com.example.test.MultiwindowTest" });
}
}
However, on Mac OS X, two windows appear on the primary display, one of which is sized to the other display. In my case, I have a 1440x900 laptop display (#1) hooked up to a 1024x768 VGA projector (#2), so I get a 1440x900 window and a 1024x768 window.
I am using Processing 1.5.1 through Eclipse on Mac OS X 10.7.3.
I believe the problem is this line in PApplet.java:
http://code.google.com/p/processing/source/browse/trunk/processing/core/src/processing/core/PApplet.java#9180
On Mac OS X, this will set the top-left of the present window to the primary display's top-left corner, instead of the top-left corner of the desired display.
As a workaround, perhaps "--location" could be used to override the determination the top-left corner, so that we could use e.g.
--location=-1024,0
to force the present window to appear on a VGA display attached on the left of the main display.
Note too that using "--exclusive --present" also works around the problem (it produces two full-screen windows on separate displays), but it is troublesome in the event that exclusive mode is not desired.
Original issue: http://code.google.com/p/processing/issues/detail?id=999