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(pointing): Temp layer threading protection. #2729

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

Conversation

petejohanson
Copy link
Contributor

@petejohanson petejohanson commented Dec 20, 2024

  • Ensure all layer operations occur on the system work queue thread.

Fixes: #2719

PR check-list

  • Branch has a clean commit history
  • Additional tests are included, if changing behaviors/core code that is testable.
  • Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited)
  • Pre-commit used to check formatting of files, commit messages, etc.
  • Includes any necessary documentation changes.

* Ensure all layer operations occur on the system work queue thread.

Fixes: zmkfirmware#2719
@petejohanson petejohanson added bug Something isn't working pointers Pointer related functionality labels Dec 20, 2024
@petejohanson petejohanson self-assigned this Dec 20, 2024
@petejohanson petejohanson requested a review from a team as a code owner December 20, 2024 23:15
@jhorology
Copy link
Contributor

Thank you for your response. It seems that the problem wasn't just about threading. Take a look at the following code.

https://github.com/petejohanson/zmk/blob/d6d4cfb88c031bf640dd82646447b2d2b57e4769/app/src/pointing/input_processor_temp_layer.c#L104-L108

If the layer is deactivated due to other factors during the active period, temp_layer_state#is_activate will not be turned off and the layer will not be activated again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pointers Pointer related functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zip_temp_layer sometimes stop working
2 participants