Skip to content

Commit

Permalink
revert(win_api): revert used functionality improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
luriusTM committed Dec 2, 2024
1 parent 6539d11 commit 2592501
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/background/windows_api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use std::{
ffi::{c_void, OsString},
os::windows::ffi::OsStrExt,
path::{Path, PathBuf},
thread::{self, sleep},
thread::sleep,
time::Duration,
};

Expand Down Expand Up @@ -87,7 +87,7 @@ use windows::{
GetSystemMetrics, GetWindow, GetWindowLongW, GetWindowRect, GetWindowTextW,
GetWindowThreadProcessId, IsIconic, IsWindow, IsWindowVisible, IsZoomed,
PostMessageW, SetForegroundWindow, SetWindowPos, ShowWindow, ShowWindowAsync,
SystemParametersInfoW, ANIMATIONINFO, GWL_EXSTYLE, GWL_STYLE, GW_OWNER,
SystemParametersInfoW, ANIMATIONINFO, GWL_EXSTYLE, GWL_STYLE, GW_OWNER, HWND_TOP,
SET_WINDOW_POS_FLAGS, SHOW_WINDOW_CMD, SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN,
SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN, SPIF_SENDCHANGE, SPIF_UPDATEINIFILE,
SPI_GETANIMATION, SPI_GETDESKWALLPAPER, SPI_SETANIMATION, SPI_SETDESKWALLPAPER,
Expand Down Expand Up @@ -359,11 +359,10 @@ impl WindowsApi {

Self::set_minimize_animation(false)?;
Self::show_window(hwnd, SW_FORCEMINIMIZE)?;
thread::sleep(Duration::from_millis(100));
Self::show_window_async(hwnd, SW_RESTORE)?;
Self::show_window(hwnd, SW_RESTORE)?;
Self::set_minimize_animation(true)?;

thread::sleep(Duration::from_millis(100));
Self::bring_to(hwnd, HWND_TOP)?;
Self::set_foreground(hwnd)
});
}
Expand Down

0 comments on commit 2592501

Please sign in to comment.