git.lucas.co / cce-browser
web browser (Servo)
git clone https://git.lucas.co/cce-browser.git

commit6d38b8a05fe7e6dc6b5eba43e99cf36d8702d86e
parent7be0b89efb
authorLucas Galante <lsgalante12@gmail.com>
date2026-10-02 14:55
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;
             }