Title: `mouse_x` / `mouse_y` not clamped to window bounds · Issue #142 · processing/libprocessing · GitHub
Open Graph Title: `mouse_x` / `mouse_y` not clamped to window bounds · Issue #142 · processing/libprocessing
X Title: `mouse_x` / `mouse_y` not clamped to window bounds · Issue #142 · processing/libprocessing
Description: In Processing, mouseX and mouseY are always clamped to the sketch window. In mewnala, they can take values outside the window, all relative to the top-left of the window within the display. Steps to reproduce Processing void setup(){ siz...
Open Graph Description: In Processing, mouseX and mouseY are always clamped to the sketch window. In mewnala, they can take values outside the window, all relative to the top-left of the window within the display. Steps t...
X Description: In Processing, mouseX and mouseY are always clamped to the sketch window. In mewnala, they can take values outside the window, all relative to the top-left of the window within the display. Steps t...
Opengraph URL: https://github.com/processing/libprocessing/issues/142
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`mouse_x` / `mouse_y` not clamped to window bounds","articleBody":"In Processing, `mouseX` and `mouseY` are always clamped to the sketch window. \n\nIn mewnala, they can take values outside the window, all relative to the top-left of the window within the display.\n\n### Steps to reproduce\n\n#### Processing\n\n```java\nvoid setup(){\n size(200,200);\n}\n\nvoid draw(){\n println(\"mouseX:\" + mouseX + \" mouseY: \" + mouseY);\n}\n```\n\nValues stay within `[0, width]` and `[0, height]`\n\n#### mewnala\n\n```python\nfrom mewnala import *\n\ndef setup():\n size(200, 200)\n\ndef draw():\n print(\"mouse_x: \" + str(mouse_x) + \" mouse_y: \" + str(mouse_y))\n\nrun()\n```\n\nExample output:\n\n```\nmouse_x: -764.0 mouse_y: -279.0\nmouse_x: 963.98 mouse_y: 837.98\n```\n\n### Expected behavior\n`mouse_x` and `mouse_y` should be clamped to `[0, width]` and `[0, height]` to match Processing.\n\n### Screenshots\n\n\u003cimg width=\"500\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/6458a7f7-a614-4bf6-8680-f9ea12e94424\" /\u003e\n\n---\n\n\u003cimg width=\"500\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/67f617cb-fc06-43fe-9635-28d8d63ee549\" /\u003e\n\n---\n\n\u003cimg width=\"500\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/761c933b-76ea-4180-a4a1-1b6ca1b506f4\" /\u003e","author":{"url":"https://github.com/SableRaf","@type":"Person","name":"SableRaf"},"datePublished":"2026-04-25T13:13:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/142/libprocessing/issues/142"}
| 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:70d4a037-1518-846f-8716-51e026df86df |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E69E:F3F3:ED00F0:153261D:6A5F8A4F |
| html-safe-nonce | 9dbaff84f9ab777bf01b92048108d27347b5ae81558a8745afafe9a890c61445 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjlFOkYzRjM6RUQwMEYwOjE1MzI2MUQ6NkE1RjhBNEYiLCJ2aXNpdG9yX2lkIjoiNjM4Nzc1MTc3OTkwMTA4MjE5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 07d3a1bf29f6935f205a2a64cdb3a432b036e64b7b76c9ee41c06cf366a1e44e |
| hovercard-subject-tag | issue:4328181854 |
| 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/libprocessing/142/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7cb8b308a4604e1c4d63b290105b2ae035ffad0405a12659c7b8a1c7dc9224f4/processing/libprocessing/issues/142 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7cb8b308a4604e1c4d63b290105b2ae035ffad0405a12659c7b8a1c7dc9224f4/processing/libprocessing/issues/142 |
| og:image:alt | In Processing, mouseX and mouseY are always clamped to the sketch window. In mewnala, they can take values outside the window, all relative to the top-left of the window within the display. Steps t... |
| 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 | 05a5a04783bf869edc9d6ffbeac22f1152a11abce708ff1bf649457a9b96836a |
| turbo-cache-control | no-preview |
| go-import | github.com/processing/libprocessing git https://github.com/processing/libprocessing.git |
| octolytics-dimension-user_id | 1617169 |
| octolytics-dimension-user_login | processing |
| octolytics-dimension-repository_id | 1101329545 |
| octolytics-dimension-repository_nwo | processing/libprocessing |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1101329545 |
| octolytics-dimension-repository_network_root_nwo | processing/libprocessing |
| 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 | ebe18dcab12b14d87b778dc32f6b70e7a6910911 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width