pub fn focus_window(
state: &Arc<AppState>,
args: &Value,
) -> Result<Value, String>Expand description
Focus a specific window by label.
Uses the CEF Views Window::activate() API on all platforms (via
post_focus_window → FocusWindowTask). On Windows in Views mode,
browser.host().window_handle() returns NULL — the previous direct
SetForegroundWindow path silently failed there. Views’ activate()
resolves the actual top-level HWND through browser_view_get_for_browser → window() which is the only correct way to reach it in Views mode.