From 8ecdb1264b8883b3aba7bccb298e0f8cab4ba751 Mon Sep 17 00:00:00 2001 From: Vladimir Borisov Date: Mon, 13 Jan 2025 16:29:51 +0200 Subject: [PATCH] fix: focus main window on launching second instance --- src/stremio_app/app.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/stremio_app/app.rs b/src/stremio_app/app.rs index ecf4cc3..4e0839f 100644 --- a/src/stremio_app/app.rs +++ b/src/stremio_app/app.rs @@ -174,11 +174,13 @@ impl MainWindow { }); // thread if let Ok(mut listener) = PipeServer::bind(socket_path) { + let focus_sender = self.focus_notice.sender(); thread::spawn(move || loop { if let Ok(mut stream) = listener.accept() { let mut buf = vec![]; stream.read_to_end(&mut buf).ok(); if let Ok(s) = str::from_utf8(&buf) { + focus_sender.notice(); // ['open-media', url] web_tx_arg.send(RPCResponse::open_media(s.to_string())).ok(); println!("{}", s);