Fix lost mouse release events in case the pane becomes inactive by JoeKar · Pull Request #3271 · micro-editor/micro (original) (raw)

Conversation

@JoeKar

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

dmaluka

dmaluka

case tcell.ButtonNone:
if t.List[t.Active()].release {
// Mouse release received, while already released...reset mouse
t.ResetMouse()

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?

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.

@JoeKar

@JoeKar

dmaluka

@JoeKar JoeKar deleted the fix/inactive-mouse-release branch

April 27, 2024 21:23

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

2 participants

@JoeKar @dmaluka