Skip to content

Commit da789f4

Browse files
committed
fix: capture tray fullscreen flag and silence warnings
1 parent 8407cc1 commit da789f4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src-tauri/src/app/setup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub fn set_system_tray(
5454
}
5555
_ => (),
5656
})
57-
.on_tray_icon_event(|tray, event| match event {
57+
.on_tray_icon_event(move |tray, event| match event {
5858
TrayIconEvent::Click { button, .. } => {
5959
if button == tauri::tray::MouseButton::Left {
6060
if let Some(window) = tray.app_handle().get_webview_window("pake") {

src-tauri/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,16 +157,16 @@ pub fn run_app() {
157157
})
158158
.build(tauri::generate_context!())
159159
.expect("error while building tauri application")
160-
.run(|app, event| {
160+
.run(|_app, _event| {
161161
// Handle macOS dock icon click to reopen hidden window
162162
#[cfg(target_os = "macos")]
163163
if let tauri::RunEvent::Reopen {
164164
has_visible_windows,
165165
..
166-
} = event
166+
} = _event
167167
{
168168
if !has_visible_windows {
169-
if let Some(window) = app.get_webview_window("pake") {
169+
if let Some(window) = _app.get_webview_window("pake") {
170170
let _ = window.show();
171171
let _ = window.set_focus();
172172
}

0 commit comments

Comments
 (0)