fix(windows): remove hwnd val checks on 0.35

Small commit to temporarily handle a regression introduced by my changes
when upgrading from 0.34 to 0.35.

Checking for a 0 HWND value results in an Err being propagated in fns
like GetForegroundWindow, while the error message just reads "The
operation completed successfully. (os error 0)".

This behaviour was causing regressions in features such as window
floating which seems to be resolved by removing the 0 HWND check.
This commit is contained in:
LGUG2Z
2022-04-15 08:28:04 -07:00
parent 5d468ae70a
commit 839f8c9bf7

View File

@@ -130,11 +130,7 @@ macro_rules! impl_process_windows_crate_integer_wrapper_result {
$(
impl ProcessWindowsCrateResult<$deref> for $input {
fn process(self) -> Result<$deref> {
if self.0 == 0 {
Ok(self.0)
} else {
Err(std::io::Error::last_os_error().into())
}
Ok(self.0)
}
}
)+