Skip to main content

toggle_tray_popover_at

Function toggle_tray_popover_at 

Source
pub fn toggle_tray_popover_at(
    app: &AppHandle,
    state: &TrayState,
    click_position: Option<(i32, i32)>,
)
Expand description

Like toggle_tray_popover but anchors the popover under click_position (M-RECP.1 / AUT-262 wiring). When the state machine resolves to Action::Show AND click_position is set, we look up the monitor the click happened on, compute the below-click anchor, and set_position BEFORE showing the window. Without the explicit set_position Tauri restores the last-known position (or the OS default), which is the source of the “popover doesn’t follow the tray icon” bug.