Module drag

Module drag 

Source

Constants§

TEAROFF_MAX_DIM 🔒
TEAROFF_MIN_DIM 🔒
Sanity bounds for tear-off window dimensions. Frontend caps via window.outerWidth/Height (CSS/DIP) but a malformed or hostile arg should not be able to size the new window absurdly.

Functions§

cancel_cross_drag
Cancel an active cross-window drag session.
complete_cross_drag
Complete a cross-window drag by committing the drop.
get_cursor_point
Get the current cursor position on screen.
get_mouse_button_state
Check whether the primary mouse button is currently pressed.
hit_test_windows 🔒
Hit-test all open browser windows to find which one contains the cursor.
open_window_at_position
Open a new window at a specific screen position (tear-off). Creates a new CEF browser window positioned so the cursor lands in the title bar.
pool_window_ready
Phase 6 — frontend signal that a pool window’s renderer is ready to receive pool:promote. Called from awaitPoolPromote AFTER the listener is installed. Only after this signal does the window enter the pool queue (otherwise emit_event_to_window would race the listener install and lose promote events).
release_drag_capture
Release mouse capture after an HTML5 drag ends outside the window.
restore_drag_cursor
Restore all system cursors to defaults.
set_drag_cursor
Replace the system no-drop cursor with a crosshair during drag.
set_js_drag_active
Signal that a JS-level drag is starting or ending (Linux GTK guard).
start_cross_drag
Start a cross-window drag session.
tear_off_pool_promote
Phase 6 — promote a pre-warmed pool window for tear-off. Returns the promoted window’s label, or an error string if the pool was empty (caller should fall back to open_window_at_position). Args: { workspaceId, screenX, screenY }.
tear_off_sc_move_handshake
Tear-off Phase 2 — the Win32 SC_MOVE handshake.
update_cross_drag
Update cross-window drag with current cursor position.
wait_for_browser_hwnd 🔒
Poll state.browsers for label until its host’s HWND is non-null or the deadline elapses. Returns the HWND as a raw pointer. Releases the browsers mutex between polls so on_after_created can register on the UI thread.