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 thread safety issue on mouse move event handling #1450

Merged
merged 3 commits into from
Feb 3, 2024

Conversation

christianparpart
Copy link
Member

@christianparpart christianparpart commented Feb 2, 2024

Fixes #1444.

@github-actions github-actions bot added the frontend Contour Terminal Emulator (GUI frontend) label Feb 2, 2024
Copy link
Member

@Yaraslaut Yaraslaut left a comment

Choose a reason for hiding this comment

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

Unfortunately i can not reproduce behaviour from #1444 so we need to ask @herrhotzenplotz to try this patch
Also, what about mouse press events? they are not protected with lock at the moment, should we guard them as well?

Signed-off-by: Christian Parpart <christian@parpart.family>
@christianparpart
Copy link
Member Author

Good point. I took the time to introduce a locked(Lockable, Lambda) helper to avoid not nice looking scoping just to keep the lock at a minimum.

Signed-off-by: Christian Parpart <christian@parpart.family>
Signed-off-by: Christian Parpart <christian@parpart.family>
@christianparpart christianparpart merged commit f8a3229 into master Feb 3, 2024
57 checks passed
@christianparpart christianparpart deleted the fix/race-on-mouseMove branch February 3, 2024 15:51
@herrhotzenplotz
Copy link
Contributor

Seems to fix #1444 👍 I'll try to switch my default terminal emulator to contour and see if the smoke comes out 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Contour Terminal Emulator (GUI frontend)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash: Cursor (63, 0) does not match clamp to screen (63, 56).
3 participants