Scaling and fullscreen on Windows 11

I’ve been having problems with Processing 4.4.4 and screen scaling on Windows 11 systems, both laptop and desktop. The only way I have been able to reliably set fullscreen or screen sizes is by setting all my monitors to 100% scaling, making my setup unusable for anything else while developing in Processing.
I do not know if this is the case in earlier 4 versions as I have been avoiding it for just this reason. Searching the forum doesn’t seem to give recent results.

Can you give an example of what’s happening with screenshots?

This is what it should look like:

To get there I need both screens at 100% scale. If I put the monitors at their recommended 150%:

If I put the monitor the sketch is displayed on at 100%, and leave the second monitor at 150%:

This behavior is independent of the Disable HiDPI Scaling preference setting.

I believe that only applies to the Processing PDE (IDE).

I have had similar issues.

Related:

Experiment with different renderers.

Try the workaround suggested in topics I shared.

:)

Thanks for the feedback, other renderers are not really an option as they all have their artefacts when pushed to their limits - where I always end up.

I can always fallback to trusty Processing 3. A bit surprised though, this feels like a very fundamental problem.

There was a recent (4.4.3) change to have pixelDensity() default to the setting for the current display in use. I would suggest trying an earlier version of 4 and see if that solves it, or just try setting pixelDensity(1) manually to match the old behavior.

(I wonder if detecting the ‘current’ monitor’s pixel density is having trouble when the IDE is in one window and the sketch in another?)

1 Like

I’ve tried several scenarios where I set primary monitor and secondary monitor scaling to 100% and 150%.

When one or two monitors are set at 150%, pixelDensity(1) is required to draw at the (for me) expected size.

For windowed sketches using pixelDensity(1) results in all cases in a correctly scaled sketch and the exported images are the correct size.

For fullscreen sketches, pixelDensity(1) results in correctly scaled content and correct resolution of saved images if the display on which the sketch runs is set to 100%.

If not the fullscreen only covers part of the screen and the exported images have a reduced resolution. On a screen at 150%, it’s reduced with a factor 1.5. Same behavior for “integer” scaling like 200%.

I did encounter positioning issues for both fullscreen and windowed sketches when switching back and forth in the display setting. I also got some problems with the preferences in the IDE not retaining my choice of display to run the sketches on. But these aren’t reproducible enough to conclude anything. It seems more stable to restart Processing after making a change.

in summary: I can get the desired behavior by running the sketches with pixelDensity(1) on one monitor set at 100% and keeping the other monitor at a comfortable 150%.

2 Likes

I wonder if this has to do with what I perceive as a fundamental difference between for example retina and Windows. (I could be 100% wrong here.)
Windows works with scaling. The effective screen resolution never changes and UI elements are scaled up. There effectively is no “pixel density”.
Retina seems to have “real” pixel density at a lower level, changing the effective resolution of the screen and handling pixel subsampling when drawing.

1 Like