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

centralize management of mouse state #3841

Merged
merged 2 commits into from
Oct 3, 2023

Conversation

myk002
Copy link
Member

@myk002 myk002 commented Oct 1, 2023

Thank you @lethosor for bringing this up. so much hackery could be removed.

Copy link
Member

@lethosor lethosor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good simplification. Haven't tested it myself yet. Supportive of waiting for 50.11-r2.

docs/dev/Lua API.rst Outdated Show resolved Hide resolved
Comment on lines +967 to +968
enabler->mouse_lbut = 0;
enabler->mouse_rbut = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this also handle mbut? or the _down fields?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't touch mbut in general so that map scrolling continues to work. The _down fields should not be modified since it can break dragging. Widgets capture the mouse on button click and then react to _down if they handled the click. if we mess with _down, then we can break whatever thinks the mouse belongs to them (including our own window dragging mechanism).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants