Display detection fails in Processing 4.5.6 on macOS + pixelDensity() #1551
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Most appropriate sub-area of Processing 4?
Core/Environment/Rendering
Processing version
4.5.6
Operating system
macOS Tahoe 26.5.2 (25F84)
Bug description
Running an empty sketch in Processing 4.5.6 produces the following warnings:
display count needs to be implemented for non-AWT
AWT disabled, displayWidth/displayHeight will be 0
Additionally, calling pixelDensity(2) produces this error:
pixelDensity(2) is not available for this display
Processing should detect the display dimensions and use pixelDensity(2) by default on the built-in Retina display.
Regression for:
Steps to reproduce this
- Install Processing 4.5.6 on macOS.
- Open Processing and create a new sketch.
- Run the sketch below.
- Observe the display-count and
displayWidth/displayHeightwarnings in the console. - Uncomment
pixelDensity(2). - Run the sketch again.
- Observe the
pixelDensity(2) is not available for this displayerror.
snippet
void setup(){
size(640,400);
//pixelDensity(2);
}
void draw(){
line(10,10,630,390);
}Additional context
Would you like to work on the issue?
No, I’m just reporting the issue
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Activity
SableRaf commentedon Aug 31, 2026
Note: a related discussion is happening here on the forum: https://discourse.processing.org/t/display-count-needs-to-be-implemented-for-non-awt/49232
AlexRussellArtist commentedon Aug 31, 2026
The discussion @SableRaf mentions relates to the same
"display count needs to be implemented for non-AWT AWT disabled, displayWidth/displayHeight will be 0"
error message, but on Windows 11. Running his snippet does not throw the
"pixelDensity(2) is not available for this display"
on (my) PC.
SableRaf commentedon Sep 11, 2026
cc @manoellribeiro
manoellribeiro commentedon Sep 11, 2026
thanks @SableRaf , reading about it
SableRaf commentedon Sep 12, 2026
Sure thing @manoellribeiro! I re-assigned it to you. Thanks for looking into it.
Fix: only pass --disable-awt for WebGPU renderer
catilac commentedon Sep 18, 2026
this is fixed in 4.5.7!