We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Placing newly spawned window
Page Index Toggle Pages: 1
Placing newly spawned window (Read 349 times)
Placing newly spawned window
Jul 20th, 2009, 3:45pm
 
Hi folks,

I'm generating a new window with a call to PApplet.main that needs to span two screens.  Unfortunately, upon calling size(1024, 1536), my window appears with 1/3 of the top space out of the screen.  This means I can't move it.  It also means that my co-ordinate system is out of whack. (I'm using an external 6D input device that's calibrated to the displays, not the processing window, and I can't easily change that.)

I see that there's an argument that can be passed to PApplet (--external), but I dont' seem to be able to get that work.

Ideas?  Comments?

-- Just a note:  It's actually quite important that the window spawn in the same location every time, so merely figuring out a hack or some way to move the window within the system isn't really very good for me.  I'm running experiments that rely on near-pixel perfect location and manually aligning windows is a recipe for poor results.  Thanks!
Re: Placing newly spawned window
Reply #1 - Jul 20th, 2009, 4:36pm
 
unfortunately, I don't have 2 screens ...envy...envy.. but as far as passing the window location as arg to the main it goes

Code:

import processing.core.PApplet;

public class ScreenLocationTest extends PApplet {

 public void setup() {
   size(1024, 1536);
 }
   
 public static void main(String args[]) {
   PApplet.main(
     new String[] { "--location=0,0", "ScreenLocationTest" }
   );
 }
}
Re: Placing newly spawned window
Reply #2 - Jul 22nd, 2009, 12:23pm
 
Brilliant!  Thanks.
Page Index Toggle Pages: 1