fix(tui): reset drag context when invalidating the widget tree
This prevents a segfault if dragging and navigating at the same time.
This commit is contained in:
parent
ce9c5ea23d
commit
3ea039f41c
2 changed files with 8 additions and 0 deletions
|
@ -664,6 +664,11 @@ pub fn get_mode() []const u8 {
|
|||
return if (current().input_mode) |m| m.name else "INI";
|
||||
}
|
||||
|
||||
pub fn reset_drag_context() void {
|
||||
const self = current();
|
||||
self.drag_source = null;
|
||||
}
|
||||
|
||||
pub fn need_render() void {
|
||||
const self = current();
|
||||
if (!(self.render_pending or self.frame_clock_running)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue