fix(linux): skip set_ignore_cursor_events to avoid tao GDK panic - #927
Open
zhiqing-yu wants to merge 1 commit into
Open
fix(linux): skip set_ignore_cursor_events to avoid tao GDK panic#927zhiqing-yu wants to merge 1 commit into
zhiqing-yu wants to merge 1 commit into
Conversation
…iepine#873) tao's set_ignore_cursor_events unwraps the GDK window internally, which is None on Linux/X11 for a transparent window that hasn't been realized yet (or, per the issue thread, sometimes even after). Calling it aborts the whole process, and it was 100% reproducible on the very first dictation hotkey press since that's the first time the never-shown pill window gets shown at all. Skip the three call sites on Linux: the off-screen parking + hide() already used for the dictate pill are sufficient to keep it from being a click target, so the click-through toggle (a macOS-only workaround) isn't needed there anyway. Fixes jamiepine#873
Contributor
|
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)
📝 WalkthroughWalkthroughLinux dictate-window click-through calls are conditionally disabled, while startup detects NVIDIA drivers and configures WebKitGTK’s DMA-BUF renderer setting when needed. ChangesLinux runtime stability
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #873 — tao panic on Linux/X11 when
set_ignore_cursor_events()is called on the dictate pill window.tao'sset_ignore_cursor_eventsunwraps the GDK window internally, which isNoneon Linux/X11 for a transparent window that hasn't been realized yet. This makes the crash 100% reproducible on the very first dictation hotkey press (or the first agent-initiated speech), since that's the first time the pill window — built hidden at startup — actually gets shown.There are three call sites hitting this:
hotkey_monitor.rs—Effect::StartRecording, the real hotkey-trigger pathmain.rs—show_dictate_window(), the agent-speech /dictate:showpathmain.rs— thedictate:hidehandlerFix
Skip
set_ignore_cursor_eventson Linux at all three sites. The dictate window is already parked off-screen (-10_000, -10_000) and hidden via.hide()on the hide path, which is sufficient on its own to keep it from being a click target — the click-through toggle is really a macOS-only workaround forhide()leaving behind an invisible NSWindow click target, so it's unnecessary (and unsafe) on Linux.Test plan
cargo check— compiles clean, no new warningsbun run tauri devon Ubuntu 24.04 / X11 / NVIDIA proprietary driver (the exact environment in the issue) and confirmed the main window renders correctlyIndependently arrived at the same fix shape @krishna3554 outlined in the issue thread; credit to their analysis for narrowing down all three call sites.
Summary by CodeRabbit