Having Issue Setting Screen size in setup

In new release processing 4.1.1,
The size(displaywidth, displayheight), this no longer work. It flags error.
and when I use fullscreen() function. The close and maximize/minimize buttons will overshoot the screen.

But I used it in previous 4.0.2rc version to set my screen size and it was very okay.

Please, help with solution to this.

Hello @avong.

Take a look at the references:

Try this:

void settings()
  {
  size(displayWidth, displayHeight);
  }

:)

I did try it, I got redefined error.

Hello @avong,

Try this:

void settings()
  {
  println(displayWidth, displayHeight); // Bonus!
  size(displayWidth, displayHeight);    // works here! 
  }
  
void setup()
  {
  //size(displayWidth, displayHeight); //gives an error!
  }

I do not know what has change between versions and used my experience and experimented a bit.

Does this work at your end?

Update

This worked with:

  • W10 Processing 3.5.4 and 4.1.1
  • Ubuntu 22.04.1 LTS Processing 4.1.1 in a VMWare VM

:)

1 Like

Sorry, just seeing your reply, I took a walk out this evening.
It is 2:30am, taking some rest, will test that in first thing in morning are update you.

My screen resolution printed (1600, 900)
and then
Got same error again.
size cannot be use here.

settings is throwing error " duplicate method"

Hello @avong,

What operating system are you using?
Which version of Processing?

Please share a minimal, reproduceable example to demonstrate the problem.

Please format the code that you are going to post:
https://discourse.processing.org/faq#format-your-code

:)

Ubuntu 22.10
Processing 4.1.1

Works as expected on System76 Linux system with Processing 4.1.1.

1 Like

Works with Processing 4.1.1 on macOS 13.0.1 too

1 Like