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 lost mouse release events in case the pane becomes inactive #3271

Merged
merged 2 commits into from
Apr 27, 2024

Conversation

JoeKar
Copy link
Collaborator

@JoeKar JoeKar commented Apr 25, 2024

A first shot to fix the mouse releases received in a different pane/tab, while the one pressed still waits for his release.

Fixes #3251

@JoeKar JoeKar requested a review from dmaluka April 25, 2024 21:28
internal/action/tab.go Outdated Show resolved Hide resolved
internal/action/tab.go Outdated Show resolved Hide resolved
@JoeKar JoeKar force-pushed the fix/inactive-mouse-release branch from 095aee2 to 1313d39 Compare April 27, 2024 17:58
internal/action/tab.go Outdated Show resolved Hide resolved
case tcell.ButtonNone:
if t.List[t.Active()].release {
// Mouse release received, while already released...reset mouse
t.ResetMouse()
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess we can return here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, we can. the ButtonNone event in the Tab's HandleEvent does what it needs to do in case the release was for the active Tab.
So I will add the return.

internal/action/tab.go Outdated Show resolved Hide resolved
internal/action/tab.go Outdated Show resolved Hide resolved
@JoeKar JoeKar force-pushed the fix/inactive-mouse-release branch from 1313d39 to 0a1447b Compare April 27, 2024 19:38
@JoeKar JoeKar merged commit 1f51d0b into zyedidia:master Apr 27, 2024
3 checks passed
@JoeKar JoeKar deleted the fix/inactive-mouse-release branch April 27, 2024 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mouse release event is lost if the pane becomes inactive
2 participants