Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mousereleased mousebutton on default renderer #181

Closed
processing-bot opened this issue Mar 14, 2021 · 7 comments
Closed

Mousereleased mousebutton on default renderer #181

processing-bot opened this issue Mar 14, 2021 · 7 comments

Comments

@processing-bot
Copy link
Collaborator

Created by: GanerCodes

When using mouseReleased, on the default renderer (not P3D for example) mouseButton is always zero. You can still see a button type (1, 2, 3) if you pass in MouseEvent and call getNative() on it.

@processing-bot
Copy link
Collaborator Author

Created by: oseph

Can confirm this behaviour on my end using macOS.

I'm looking at handleMouseEvent(MouseEvent event) method in PApplet and can't seem to make sense of why this might be happening. I'm new to contributing but I'd be happy to investigate further if someone can point me in the direction.

While I was there I also noticed code to allow macOS users to ctrl-click as right mouse, but this does not seem to work either.

@processing-bot
Copy link
Collaborator Author

Created by: behreajj

Hi @oseph , maybe in PSurfaceAWT, due to this update on Jan. 20. My hack to deal with this, based on @GanerCodes suggestion, is here. I was not able to test on Mac.

mouseClicked is impacted as well as mouseReleased.

@processing-bot
Copy link
Collaborator Author

Created by: oseph

Alrighty, I think I fixed this bug in #188. Feel free to try it out. Works on my end but I only tested on macOS. Give it a spin if you're using Linux/Windows!

@processing-bot
Copy link
Collaborator Author

Created by: behreajj

Hi @oseph,

Thanks for all your hard work. If I were you I would split this into 3 separate pull requests: one to fix the mouse released/clicked issue, one to fix the mac os control click issue and one to introduce new constants for mouse events. I'm only a random person on the Internet, mind you, trying to keep his own library working. This is just my 2c.

@processing-bot
Copy link
Collaborator Author

Created by: oseph

@behreajj thank you! That sounds totally reasonable to me. I'm still a little new to this whole contributing thing, so would be happy to do it the proper way. I'll close/cancel this pull request and split it into 3 separate ones.

@processing-bot
Copy link
Collaborator Author

Created by: benfry

Fixed for the release after 4.0 alpha 5 (either 4.0 alpha 6 or beta 1).

@processing-bot
Copy link
Collaborator Author

Created by: github-actions[bot]

This issue has been automatically locked. To avoid confusion with reports that have already been resolved, closed issues are automatically locked 30 days after the last comment. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant