web browser (Servo)
git clone https://git.lucas.co/cce-browser.git
refactor: bring the window forward with cce_ui::ipc::focus_window
The forwarded-open path sent `focus-window cce-browser` through
send_command, which reads the reply with no deadline. focus_window
(cce-ui c16ef39) is the same command, bounded at a second. Still on its
own thread, so the open never waits on the compositor.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
src/main.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main.rs b/src/main.rs
index 9fd53b1..e8d1f74 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -2692,7 +2692,7 @@ impl Application for BrowserApp {
// compositor deliberately answers it with an attention
// notification, not focus.)
std::thread::spawn(|| {
- let _ = cce_ui::ipc::send_command("cce", "focus-window cce-browser");
+ let _ = cce_ui::ipc::focus_window("cce-browser");
});
*needs_rebuild = true;
}