mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-05 10:10:46 +00:00
On X11 (including XWayland) and Windows, the pointer leaving the window
reaches egui as PointerGone, and egui-winit then drops the button release
because it has no pointer position. finish_drag never saw the drag end:
the panel stayed in its dock with the drop outline following the pointer
until the next click inside the window.
Leaving the window now ends the drag as a drop. interact_pos still holds
the last position on that frame, and the panel floats there (clamped to
the window) instead of docking into whatever target sits at the edge.
Test: tab_dragged_out_of_the_window_floats_where_it_left. It fails without
the fix (no action at all).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit aecdf819ba)