Skip to content

Commit 6343600

Browse files
committed
fix(core): fix window label in tray icon click event
1 parent 07b7755 commit 6343600

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src-tauri/src/system/tray.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ pub fn new_tray_icon<R: Runtime>(app_handle: &AppHandle<R>) -> tauri::Result<()>
3131
{
3232
let window = tray
3333
.app_handle()
34-
.get_window(globals::MAIN_TRAY_ICON_ID)
35-
.expect("Could not get window.");
34+
.get_window(globals::MAIN_WINDOW_LABEL)
35+
.expect(format!("Could not get window with label `{}`.", globals::MAIN_WINDOW_LABEL).as_str());
3636

3737
let _ = window.show();
3838
let _ = window.set_focus();

0 commit comments

Comments
 (0)