mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 13:25:51 +03:00
[PR #967] [CLOSED] Fix consume status of mouse events in custom capture #1084
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#1084
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/rivo/tview/pull/967
Author: @GiGurra
Created: 4/19/2024
Status: ❌ Closed
Base:
master← Head:mouse-capture-consume-events📝 Commits (1)
46d061fconsume captured mouse events📊 Changes
1 file changed (+3 additions, -0 deletions)
View changed files
📝
box.go(+3 -0)📄 Description
At present, it is not possible to consume events in the mouse event capture function, even if you return nil. This causes (among other things)
Application.draw()to not fire properly, and essentially, means that any gui state changes you make inside the capture function, isn't rendered.This PR hopefully fixes that. I couldn't find any tests to modify/change, do you need any other info?
The following code (from the Application event loop) shows where the draw call would be skipped when the wrong consume status is returned
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.