fix: only reset mouse drag context when the dragging button is released

closes #320
This commit is contained in:
CJ van den Berg 2025-11-03 20:48:08 +01:00
parent 1fb3a8828a
commit fa6ea11d57
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 22 additions and 4 deletions

View file

@ -206,7 +206,7 @@ pub const TabBar = struct {
if (self.tabs[dragging].widget.dynamic_cast(Tab.ButtonType)) |btn| btn.hover = false;
self.update();
for (self.widget_list.widgets.items) |*widgetstate| if (widgetstate.widget.dynamic_cast(Tab.ButtonType)) |btn| if (btn.drag_pos) |_|
tui.set_drag_source(&widgetstate.widget);
tui.update_drag_source(&widgetstate.widget);
tui.refresh_hover();
}
}