openframeworks / openframeworks/openFrameworks
mouse handling inconsistencies
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
According to the docs there are 3 signatures for mouseReleased() that an app can use. However, mouseReleased() with no params never gets called - only mouseReleased(int x, int y, int button) is called from within the default mouseReleased(ofMouseEventArgs & mouse) handler in ofBaseApp.h
Also, mouseX and mouseY get updated in the default handlers that accept ofMouseEventArgs params within ofBaseApp.h. However, if a user app overrides these methods, mouseX and mouseY are no longer guaranteed to get updated.
Maybe there's already an outstanding issue for this (?) but I couldn't find one. I'd be happy to help implement a solution based on the desired design.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the mouseReleased documentation and the default handlers in ofBaseApp.h. Trace how the no-argument and coordinate signatures are dispatched and when mouseX and mouseY are updated, then define behavior that remains consistent when applications override the ofMouseEventArgs handlers. Done means the documented signatures work and mouse coordinates are reliably updated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100