Title: Display detection fails in Processing 4.5.6 on macOS + pixelDensity() · Issue #1551 · processing/processing4 · GitHub
Open Graph Title: Display detection fails in Processing 4.5.6 on macOS + pixelDensity() · Issue #1551 · processing/processing4
X Title: Display detection fails in Processing 4.5.6 on macOS + pixelDensity() · Issue #1551 · processing/processing4
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: displ...
Open Graph 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....
X 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....
Opengraph URL: https://github.com/processing/processing4/issues/1551
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Display detection fails in Processing 4.5.6 on macOS + pixelDensity()","articleBody":"### Most appropriate sub-area of Processing 4?\n\nCore/Environment/Rendering\n\n### Processing version\n\n4.5.6\n\n### Operating system\n\nmacOS Tahoe 26.5.2 (25F84)\n\n### Bug description\n\nRunning an empty sketch in Processing 4.5.6 produces the following warnings:\n\n\n```\ndisplay count needs to be implemented for non-AWT\nAWT disabled, displayWidth/displayHeight will be 0\n```\n\n\nAdditionally, calling `pixelDensity(2)` produces this error:\n\n\n```\npixelDensity(2) is not available for this display\n```\n\nProcessing should detect the display dimensions and use `pixelDensity(2)` by default on the built-in Retina display.\n\nRegression for:\n\n* https://github.com/processing/processing4/pull/1226\n* https://github.com/processing/processing4/pull/1038\n\n### Steps to reproduce this\n\n1. Install Processing 4.5.6 on macOS.\n2. Open Processing and create a new sketch.\n3. Run the sketch below.\n4. Observe the display-count and `displayWidth`/`displayHeight` warnings in the console.\n5. Uncomment `pixelDensity(2)`.\n6. Run the sketch again.\n7. Observe the `pixelDensity(2) is not available for this display` error.\n\n### snippet\n\n```processing\nvoid setup(){\n size(640,400);\n //pixelDensity(2);\n}\n\nvoid draw(){\n line(10,10,630,390);\n}\n```\n\n\n### Additional context\n\n\u003cimg width=\"1118\" height=\"717\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/76fb1896-cab4-4f41-811d-d05761e5874c\" />\n\n### Would you like to work on the issue?\n\nNo, I’m just reporting the issue","author":{"url":"https://github.com/SableRaf","@type":"Person","name":"SableRaf"},"datePublished":"2026-07-20T12:42:54Z","url":"https://github.com/processing/processing4/issues/1551"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a323cf50-3b31-e303-6594-5e300dda90bc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EBA6:8ECF4:3F4A9D:56BDE5:6B060382 |
| html-safe-nonce | c780c131b16672f51b421191bfc111f8dcfb9074e952cebe7251db4103b1fd17 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQkE2OjhFQ0Y0OjNGNEE5RDo1NkJERTU6NkIwNjAzODIiLCJ2aXNpdG9yX2lkIjoiNzIyMzI0MDAzNDE1MjIxOTUyMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b1dac86051e1370636a25da7775793c7b9d4117224b383d42f34e1602a7bb4cd |
| hovercard-subject-tag | issue:4929034112 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/processing/processing4/1551/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8d80cbe32a8ae2187e5a03f07cc102cb1c010cc270cb4d3e8e6e600117e945e9/processing/processing4/issues/1551 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8d80cbe32a8ae2187e5a03f07cc102cb1c010cc270cb4d3e8e6e600117e945e9/processing/processing4/issues/1551 |
| og:image:alt | 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.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | SableRaf |
| hostname | github.com |
| expected-hostname | github.com |
| None | 47127d2f2009e000f3401193f8b4163109ac669adad0804de1ee0e6333ca7b9e |
| turbo-cache-control | no-preview |
| go-import | github.com/processing/processing4 git https://github.com/processing/processing4.git |
| octolytics-dimension-user_id | 1617169 |
| octolytics-dimension-user_login | processing |
| octolytics-dimension-repository_id | 844382769 |
| octolytics-dimension-repository_nwo | processing/processing4 |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 844382769 |
| octolytics-dimension-repository_network_root_nwo | processing/processing4 |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0760ea46a027ba5099cdef7abd54f27865eb4f44 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width