Skip to content

Commit

Permalink
Fix app freezing when pressing middle mouse button on native macOS (#…
Browse files Browse the repository at this point in the history
…1702)

A native macOS app stops responding after pressing middle mouse button
once. This PR fixes this by correcting a typo in the event handling of
ComposeWindow.macos.kt.

## Testing
Tested using mpp demo sample on macOS arm64
  • Loading branch information
Thomas-Vos authored Dec 3, 2024
1 parent 92105b8 commit ec07315
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ private class ComposeWindow(
onMouseEvent(event, PointerEventType.Release, PointerButton.Secondary)
}
override fun otherMouseDown(event: NSEvent) {
onMouseEvent(event, PointerEventType.Release, PointerButton(event.buttonNumber.toInt()))
onMouseEvent(event, PointerEventType.Press, PointerButton(event.buttonNumber.toInt()))
}
override fun otherMouseUp(event: NSEvent) {
onMouseEvent(event, PointerEventType.Press, PointerButton(event.buttonNumber.toInt()))
onMouseEvent(event, PointerEventType.Release, PointerButton(event.buttonNumber.toInt()))
}
override fun mouseMoved(event: NSEvent) {
onMouseEvent(event, PointerEventType.Move)
Expand Down

0 comments on commit ec07315

Please sign in to comment.