fix(wm): handle settings window focus gracefully

This commit ensures that failures to focus on the Settings and similar
windows on Windows 11 will allow execution to continue so that the
active window border location can be updated without exiting early from
the command handler with a propagated error.
This commit is contained in:
LGUG2Z
2022-08-08 19:00:08 -07:00
parent dae77d87b9
commit 01b2c52460

View File

@@ -243,7 +243,17 @@ impl Window {
}
// This isn't really needed when the above command works as expected via AHK
WindowsApi::set_focus(self.hwnd())
match WindowsApi::set_focus(self.hwnd()) {
Ok(_) => {}
Err(error) => {
tracing::error!(
"could not set focus, but continuing execution of focus(): {}",
error
);
}
};
Ok(())
}
#[allow(dead_code)]