Skip to content

Commit

Permalink
chore(showwindow): use async
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-online committed Apr 2, 2023
1 parent 949792f commit aaf9a21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ fn get_apps(handles: State<Handles>) -> (String, usize) {
if process_id != 0 {
match run_pssuspend(process_id, true) {
Ok(_) => {
ShowWindow(i.hwnd, SW_HIDE);
ShowWindowAsync(i.hwnd, SW_HIDE);
}
Err(e) => {
println!("Error: {}", e);
Expand Down Expand Up @@ -151,7 +151,7 @@ fn restore(handles: State<Handles>) {
match handle.pid {
Some(pid) => match run_pssuspend(pid, false) {
Ok(_) => {
ShowWindow(handle.hwnd, SW_SHOW);
ShowWindowAsync(handle.hwnd, SW_SHOW);
}
Err(e) => {
println!("Error: {}", e);
Expand Down

0 comments on commit aaf9a21

Please sign in to comment.