Skip to content

--present --display=<n> doesn't work correctly on Mac OS X #1037

Closed

Description

@processing-bugs

Original author: nneon...@gmail.com (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[] { &quot;--present&quot;, &quot;--display=1&quot;, &quot;com.example.test.MultiwindowTest&quot; });
    PApplet.main(new String[] { &quot;--present&quot;, &quot;--display=2&quot;, &quot;com.example.test.MultiwindowTest&quot; });
}

}

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

Activity

  1. processing-bugs commented on Feb 10, 2013

    @processing-bugs
    Author

    This issue is a duplicate of #71

  2. github-actions commented on Jun 18, 2021

    @github-actions

    This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  3. locked as resolved and limited conversation to collaborators on Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions