processing / processing/processing4

full screen bug with few device

Open
#1,524 1 comment 1 reaction 1 assignee View on GitHub

@catilac is already working on this.

Since Jun 9, 2026.

bug
Dominant language
Java
Stars
494
Forks
183
Avg merge
4h 39m
Merged PRs (30d)
3

Description

Most appropriate sub-area of Processing 4?

Core/Environment/Rendering

Processing version

Processing 4.5.2

Operating system

MacOS Tahoe 26.4.2

Bug description

With my Video Projector BenQ PJ in fullscreen() in P3Dand in P2D the window is place on the main screen.
In classic mode that's ok.

Image

May be it's due from my VP because this one is old, I don't know. The definition of my VP is 1920x1080
To fix it I use this code :

import java.awt.GraphicsEnvironment;
import java.awt.GraphicsDevice;
import java.awt.Rectangle;

int target_screen = 2;
void setup() {
  fullScreen(P3D,target_screen);
  secure_screen_place(target_screen);
}

void secure_screen_place(int target) {
  GraphicsEnvironment environment = GraphicsEnvironment.getLocalGraphicsEnvironment();
  GraphicsDevice[] devices = environment.getScreenDevices();
  Rectangle rect = devices[this.display -1].getDefaultConfiguration().getBounds();
  surface.setLocation(0,0);
  int x = (int)rect.getX();
  int y = (int)rect.getY();
  println("repositionnement", x, y);
  surface.setLocation(x,y);
}

For an unknown reason it's necessary to set in first the location to zero before move to goal position.

May be it's linked to
https://github.com/processing/processing4/issues/1518
https://github.com/processing/processing4/issues/1426

I fix this bug in Processing If you're interested I can push it !!!
But it's more an hack, because It's hard to manage the variable between the static and the non static class PApplet and PSurface

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.