mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-06-12 21:44:27 +02:00
feat(wm): allow valid attach_thread_input failures
This commit allows the Window.focus() fn to continue execution if AttachThreadInput fails, as there are valid situations in which this might fail, but the focusing of the window may/should still succeed. fix #156
This commit is contained in:
@@ -680,7 +680,7 @@ pub fn send_message(bytes: &[u8]) -> Result<()> {
|
||||
let socket = socket.as_path();
|
||||
|
||||
let mut stream = UnixStream::connect(&socket)?;
|
||||
Ok(stream.write_all(&*bytes)?)
|
||||
Ok(stream.write_all(bytes)?)
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_lines)]
|
||||
@@ -720,8 +720,9 @@ fn main() -> Result<()> {
|
||||
color_log.push("komorebi.log");
|
||||
let file = TailedFile::new(File::open(color_log)?);
|
||||
let locked = file.lock();
|
||||
for line in locked.lines() {
|
||||
println!("{}", line?);
|
||||
#[allow(clippy::significant_drop_in_scrutinee)]
|
||||
for line in locked.lines().flatten() {
|
||||
println!("{}", line);
|
||||
}
|
||||
}
|
||||
SubCommand::Focus(arg) => {
|
||||
|
||||
Reference in New Issue
Block a user