Skip to content

Fixes #873 by avoiding the tao Linux/X11 panic triggered when set_ignore_cursor_events() is called on the transparent dictate overlay window.#875

Open
krishna3554 wants to merge 1 commit into
jamiepine:mainfrom
krishna3554:fix/linux-tao-ignore-cursor-panic
Open

Fixes #873 by avoiding the tao Linux/X11 panic triggered when set_ignore_cursor_events() is called on the transparent dictate overlay window.#875
krishna3554 wants to merge 1 commit into
jamiepine:mainfrom
krishna3554:fix/linux-tao-ignore-cursor-panic

Conversation

@krishna3554

@krishna3554 krishna3554 commented Jul 10, 2026

Copy link
Copy Markdown

Summary

Fixes #873 by avoiding the tao Linux/X11 panic triggered when set_ignore_cursor_events() is called on the transparent dictate overlay window.

Changes

  • Disable dictate window transparency on Linux.
  • Skip set_ignore_cursor_events(true) in the dictate:hide handler on Linux.
  • Skip set_ignore_cursor_events(false) in dictate show paths on Linux.
  • Preserve existing behavior on macOS and Windows.

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 check was attempted but could not complete because the local checkout is missing the expected Tauri sidecar binary:
    binaries/voicebox-server-x86_64-unknown-linux-gnu
  • cargo fmt --check was attempted, but the repository currently has pre-existing formatting differences across unrelated Rust files.

Summary by CodeRabbit

  • Bug Fixes
    • Improved Linux stability when using the dictate window by preventing crashes related to click-through behavior.
    • Preserved cursor interaction behavior on supported platforms while avoiding unsupported Linux window handling.

Copilot AI review requested due to automatic review settings July 10, 2026 07:10
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d078384c-b3fd-4512-8788-b072bc19dac9

📥 Commits

Reviewing files that changed from the base of the PR and between f2cf2a7 and e8837e3.

📒 Files selected for processing (2)
  • tauri/src-tauri/src/hotkey_monitor.rs
  • tauri/src-tauri/src/main.rs

📝 Walkthrough

Walkthrough

The 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.

Changes

Linux dictate window behavior

Layer / File(s) Summary
Platform-specific dictate window configuration
tauri/src-tauri/src/main.rs
The dictate window uses transparency only on non-Linux targets.
Platform-specific cursor-event lifecycle
tauri/src-tauri/src/main.rs, tauri/src-tauri/src/hotkey_monitor.rs
Cursor-event restoration, click-through enabling, and recording-start re-enabling are gated to non-Linux targets.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the Linux/X11 panic fix around set_ignore_cursor_events on the transparent dictate overlay.
Linked Issues check ✅ Passed The changes address #873 by skipping cursor-event toggling and disabling Linux transparency, which matches the reported crash cause.
Out of Scope Changes check ✅ Passed The edits stay focused on the Linux dictate overlay crash fix and do not introduce unrelated behavior changes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 via cfg!(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.

Comment thread tauri/src-tauri/src/main.rs
Comment thread tauri/src-tauri/src/main.rs
Comment thread tauri/src-tauri/src/hotkey_monitor.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tao panic on Linux set_ignore_cursor_events crashes on transparent windows

2 participants