Fixes #873 by avoiding the tao Linux/X11 panic triggered when set_ignore_cursor_events() is called on the transparent dictate overlay window.#875
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe dictate window is no longer transparent on Linux. Cursor-event toggling during window visibility changes and recording startup now runs only on non-Linux platforms. ChangesLinux dictate window behavior
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR addresses a Linux/X11 crash in the Tauri dictate overlay by avoiding tao’s panic path when set_ignore_cursor_events() is called on transparent windows. It does so by disabling transparency on Linux and compiling out the click-through toggling calls on Linux while preserving the existing behavior on macOS and Windows.
Changes:
- Disable dictate window transparency on Linux (
transparent(false)effectively viacfg!(target_os = "linux")). - Guard all
set_ignore_cursor_events(true/false)calls so they are not compiled on Linux. - Keep existing dictate overlay show/hide flow (move off-screen + hide) as the Linux-safe mechanism.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
tauri/src-tauri/src/main.rs |
Disables dictate window transparency on Linux and gates click-through toggling in show/hide paths to avoid the tao/X11 panic. |
tauri/src-tauri/src/hotkey_monitor.rs |
Gates click-through toggling in the hotkey-driven dictate show path to match the Linux-safe behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Fixes #873 by avoiding the
taoLinux/X11 panic triggered whenset_ignore_cursor_events()is called on the transparent dictate overlay window.Changes
set_ignore_cursor_events(true)in thedictate:hidehandler on Linux.set_ignore_cursor_events(false)in dictate show paths on Linux.Why
On Linux/X11, transparent Tauri windows can leave tao without a realized GDK window. Calling
set_ignore_cursor_events()then panics inside tao when it unwraps a missing window handle.On Linux, the dictate overlay is already moved off-screen and hidden when dismissed, so skipping click-through toggling avoids the crash without leaving an interactive invisible window.
Verification
cargo checkwas attempted but could not complete because the local checkout is missing the expected Tauri sidecar binary:binaries/voicebox-server-x86_64-unknown-linux-gnucargo fmt --checkwas attempted, but the repository currently has pre-existing formatting differences across unrelated Rust files.Summary by CodeRabbit