pub struct DragSession {Show 28 fields
pub session_id: DragSessionId,
pub pointer_id: PointerId,
pub source_window: AppWindowId,
pub current_window: AppWindowId,
pub cross_window_hover: bool,
pub kind: DragKindId,
pub start_position: Point,
pub position: Point,
pub cursor_grab_offset: Option<Point>,
pub follow_window: Option<AppWindowId>,
pub moving_window: Option<AppWindowId>,
pub window_under_moving_window: Option<AppWindowId>,
pub window_under_moving_window_source: WindowUnderCursorSource,
pub transparent_payload_applied: bool,
pub transparent_payload_hit_test_passthrough_applied: bool,
pub window_under_cursor_source: WindowUnderCursorSource,
pub diag_cursor_screen_pos_raw_physical_px: Option<Point>,
pub diag_cursor_screen_pos_used_physical_px: Option<Point>,
pub diag_cursor_screen_pos_was_clamped: bool,
pub diag_cursor_override_active: bool,
pub diag_current_window_outer_pos_physical_px: Option<Point>,
pub diag_current_window_decoration_offset_physical_px: Option<Point>,
pub diag_current_window_client_origin_screen_physical_px: Option<Point>,
pub diag_current_window_client_origin_source_platform: bool,
pub diag_current_window_scale_factor_x1000: Option<u32>,
pub diag_current_window_local_pos_from_screen_logical_px: Option<Point>,
pub dragging: bool,
pub phase: DragPhase,
/* private fields */
}Fields§
§session_id: DragSessionId§pointer_id: PointerId§source_window: AppWindowId§current_window: AppWindowId§cross_window_hover: bool§kind: DragKindId§start_position: Point§position: Point§cursor_grab_offset: Option<Point>Cursor grab offset in window-local logical coordinates.
Runners may use this to keep an OS window under the cursor during docking interactions (ImGui-style multi-viewport behavior), without needing to downcast the typed payload.
follow_window: Option<AppWindowId>If set, requests the runner to treat this drag as a “move the OS window” interaction for the given window id, while still allowing cross-window docking hover/drop routing.
moving_window: Option<AppWindowId>Best-effort diagnostics hint: OS window currently being moved by the runner for this drag session (ImGui-style “follow window” multi-viewport behavior).
This is intentionally diagnostics-only: it does not request follow behavior; it records what the runner is currently doing.
window_under_moving_window: Option<AppWindowId>Best-effort diagnostics hint: when Self::moving_window is set, the window considered
“under” the moving window at the current cursor position.
This exists to support ImGui-style terminology where HoveredWindow and
HoveredWindowUnderMovingWindow can differ during a viewport drag. Fret currently keeps
current_window as the runner-selected hover/drop target; this field makes it possible to
gate and evolve “peek-behind” behavior without reinterpreting current_window.
window_under_moving_window_source: WindowUnderCursorSourceBest-effort diagnostics hint: which mechanism was used to select
Self::window_under_moving_window.
transparent_payload_applied: boolBest-effort diagnostics hint: true when the runner has applied an ImGui-style “transparent payload” treatment to the moving dock window (e.g. reduced opacity and/or click-through hit-test passthrough while following the cursor).
transparent_payload_hit_test_passthrough_applied: boolBest-effort diagnostics hint: true when the runner successfully applied click-through hit-test passthrough to the moving dock window while transparent payload is enabled.
This is a result signal (applied by the OS/window backend), not a request. When false, the runner either did not attempt passthrough or the platform/backend rejected it.
window_under_cursor_source: WindowUnderCursorSourceBest-effort diagnostics hint: which mechanism was used to select the hovered window during cross-window drag routing (OS-backed vs heuristic).
diag_cursor_screen_pos_raw_physical_px: Option<Point>Best-effort diagnostics hint: raw cursor position in screen-space physical pixels, as observed by the runner.
diag_cursor_screen_pos_used_physical_px: Option<Point>Best-effort diagnostics hint: cursor position in screen-space physical pixels used for local position conversion (may be clamped during scripted injection).
diag_cursor_screen_pos_was_clamped: boolTrue when Self::diag_cursor_screen_pos_used_physical_px differs from
Self::diag_cursor_screen_pos_raw_physical_px due to runner-side clamping.
diag_cursor_override_active: boolTrue when diagnostics cursor override/input isolation is active while recording the cursor conversion hints.
diag_current_window_outer_pos_physical_px: Option<Point>Best-effort diagnostics hint: outer window position (top-left) in screen-space physical
pixels for Self::current_window at the time routing was computed.
diag_current_window_decoration_offset_physical_px: Option<Point>Best-effort diagnostics hint: window decoration offset (client origin relative to outer
origin) in physical pixels for Self::current_window.
diag_current_window_client_origin_screen_physical_px: Option<Point>Best-effort diagnostics hint: computed client origin in screen-space physical pixels for
Self::current_window at the time routing was computed.
diag_current_window_client_origin_source_platform: boolTrue when the runner obtained the client origin from a platform API (e.g. Win32 HWND),
rather than falling back to outer_position + surface_position.
diag_current_window_scale_factor_x1000: Option<u32>Best-effort diagnostics hint: scale factor (DPI) of Self::current_window used by the
runner to convert screen physical pixels into window-local logical pixels.
diag_current_window_local_pos_from_screen_logical_px: Option<Point>Best-effort diagnostics hint: local cursor position derived from the screen-space cursor position + client origin + scale factor.
dragging: bool§phase: DragPhase