We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The WindowEvent::Focused event does not get fired when listening for it via the App run callback.
app.run(move |app_handle, e| { match e { RunEvent::WindowEvent { event, .. } => { match event { WindowEvent::Focused(focused) => { println!("Focused: {}", focused); } _ => (), } } _ => (), } });
The event should fire printing "Focused: true" or "Focused: false" to the console depending on the focused state of the window.
Environment › OS: Windows 10.0.22621 X64 › Webview2: 110.0.1587.69 › MSVC: - Visual Studio Community 2019 › Node.js: 18.14.0 › npm: 9.3.1 › pnpm: 7.23.0 › yarn: 1.22.19 › rustup: 1.25.2 › rustc: 1.69.0-nightly › cargo: 1.69.0-nightly › Rust toolchain: nightly-x86_64-pc-windows-msvc Packages › @tauri-apps/cli [NPM]: 1.2.3 › @tauri-apps/api [NPM]: 1.2.0 › tauri [RUST]: 1.2.4, › tauri-build [RUST]: 1.2.1, › tao [RUST]: 0.15.8, › wry [RUST]: 0.23.4, App › build-type: bundle › CSP: unset › distDir: ../dist › devPath: http://localhost:1420/ › framework: React › bundler: Vite App directory structure ├─ .git ├─ .vscode ├─ dist ├─ node_modules ├─ public ├─ src └─ src-tauri
No response
Adding a handler for it via on_window_event works fine
on_window_event
The text was updated successfully, but these errors were encountered:
fix: dispatch focus event to app.run on Windows, closes #6460
5ef711e
ff4ea1e
amrbashir
No branches or pull requests
Describe the bug
The WindowEvent::Focused event does not get fired when listening for it via the App run callback.
Reproduction
Expected behavior
The event should fire printing "Focused: true" or "Focused: false" to the console depending on the focused state of the window.
Platform and versions
Stack trace
No response
Additional context
Adding a handler for it via
on_window_event
works fineThe text was updated successfully, but these errors were encountered: