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

Fix inventory items unresponsive after tab interaction until LMB click on formspec #14661

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sfence
Copy link
Contributor

@sfence sfence commented May 15, 2024

To do

Ready for Review.

How to test

See #14250

Copy link
Contributor

@appgurueu appgurueu left a comment

Choose a reason for hiding this comment

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

Tested, works. Logic checks out. Thanks.

Copy link
Member

@grorp grorp left a comment

Choose a reason for hiding this comment

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

I don't like this because the inventory handling leaks into an entirely unrelated part of the code. (m_held_mouse_button was introduced by #13146 and is only used by the inventory code.)

But hey, it works... Not approving or disapproving, I'm just annoyed by the amount of smell in the formspec code.

@sfence
Copy link
Contributor Author

sfence commented May 26, 2024

I don't like this because the inventory handling leaks into an entirely unrelated part of the code. (m_held_mouse_button was introduced by #13146 and is only used by the inventory code.)

But hey, it works... Not approving or disapproving, I'm just annoyed by the amount of smell in the formspec code.

I can move the m_held_mouse_button resetting code to some method like OnEvent_reset` or similar if it will be more clear.

@appgurueu
Copy link
Contributor

It does seem like #13146 introduced some code smells, but I don't think it should be the job of this PR to refactor that. I don't think that introducing another function for this single assignment (?) will help clarity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inventory items unresponsive after tab interaction until LMB click on formspec
3 participants