mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-25 10:08:33 +02:00
chore(deps): bump windows-rs from 0.57 to 0.58
Not a huge fan of these updates in the windows-rs crate which swap the isize values which were previously wrapped in various handles with *mut core::ffi:c_void pointers. In order to at least keep this codebase sane, all of the wrapper functions exposed in WindowsApi now take isize wherever they previously took HWND, HMONITOR, HINSTANCE etc. Going forward any pub fn in WindowsApi should prefer isize over Windows handles which wrap c_void pointers.
This commit is contained in:
@@ -2118,7 +2118,7 @@ Stop-Process -Name:komorebi -ErrorAction SilentlyContinue
|
||||
let hwnds: Vec<isize> = serde_json::from_reader(reader)?;
|
||||
|
||||
for hwnd in hwnds {
|
||||
restore_window(HWND(hwnd));
|
||||
restore_window(hwnd);
|
||||
}
|
||||
}
|
||||
Err(error) => {
|
||||
@@ -2297,7 +2297,7 @@ Stop-Process -Name:komorebi -ErrorAction SilentlyContinue
|
||||
let hwnds: Vec<isize> = serde_json::from_reader(reader)?;
|
||||
|
||||
for hwnd in hwnds {
|
||||
restore_window(HWND(hwnd));
|
||||
restore_window(hwnd);
|
||||
}
|
||||
}
|
||||
SubCommand::ResizeEdge(resize) => {
|
||||
@@ -2595,11 +2595,11 @@ fn show_window(hwnd: HWND, command: SHOW_WINDOW_CMD) {
|
||||
};
|
||||
}
|
||||
|
||||
fn remove_transparency(hwnd: HWND) {
|
||||
let _ = komorebi_client::Window::from(hwnd.0).opaque();
|
||||
fn remove_transparency(hwnd: isize) {
|
||||
let _ = komorebi_client::Window::from(hwnd).opaque();
|
||||
}
|
||||
|
||||
fn restore_window(hwnd: HWND) {
|
||||
show_window(hwnd, SW_RESTORE);
|
||||
fn restore_window(hwnd: isize) {
|
||||
show_window(HWND(hwnd as *mut core::ffi::c_void), SW_RESTORE);
|
||||
remove_transparency(hwnd);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user