slint-ui/slint · error
no simulated native drag in flight
Error message
no simulated native drag in flight
What it means
Error "no simulated native drag in flight" thrown in slint-ui/slint.
Source
Thrown at internal/backends/testing/testing_backend.rs:393
/// the final negotiated action.
pub fn simulate_native_drop(
&self,
target: &i_slint_core::api::Window,
position: LogicalPosition,
) -> DragAction {
let action = self.deliver_native_drag(target, position, true);
WindowInner::from_pub(&self.window).report_drag_finished(action);
action
}
fn deliver_native_drag(
&self,
target: &i_slint_core::api::Window,
position: LogicalPosition,
drop: bool,
) -> DragAction {
let (data, allowed) =
self.native_drag.borrow().clone().expect("no simulated native drag in flight");
let mut event = DropEvent::default();
event.data = data;
event.position = position;
event.proposed_action =
i_slint_core::items::compute_proposed_action(Default::default(), allowed);
let event = if drop {
MouseEvent::Drop { event, allowed }
} else {
MouseEvent::DragMove { event, allowed }
};
WindowInner::from_pub(target).process_drag_event(event).unwrap_or(DragAction::None)
}
}
impl WindowAdapterInternal for TestingWindow {
fn input_method_request(&self, request: i_slint_core::window::InputMethodRequest) {
self.ime_requests.borrow_mut().push(request)
}View on GitHub (pinned to 3fd8f2ec03)
Solutions
- Start a simulated native drag before trying to complete or drop it.
- Check the drag simulation call ordering in the test.
When it happens
Trigger: Thrown at internal/backends/testing/testing_backend.rs:393 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of slint-ui/slint@3fd8f2ec03 (2026-08-19).
Data as JSON: /api/errors/4088cd629ec3926f.
Report an issue: GitHub.