Skip to content

Commit

Permalink
fix(windows): remove hwnd val checks on 0.35
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
LGUG2Z committed Apr 15, 2022
1 parent 5d468ae commit 839f8c9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions komorebi/src/windows_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
)+
Expand Down

0 comments on commit 839f8c9

Please sign in to comment.