* fix(text_injection): use wtype on compositors that don't bridge IBus to native apps
On Wayland compositors that don't bridge IBus to native clients (COSMIC,
Sway, Hyprland, Wayfire, river, niri, ...), the IBus engine's commit_text()
reaches only XWayland and GTK/Qt apps that load the IBus IM module. Native
apps such as cosmic-term receive nothing, yet inject_text() reports success,
so dictation silently does nothing.
- Add a compositor denylist (_wayland_compositor_bridges_ibus) so IBus is
skipped on those compositors and the virtual-keyboard path (wtype/ydotool)
is used instead. A denylist (rather than an allowlist) keeps the existing
IBus-preferred behaviour on unrecognised desktops. Complements the recent
KDE Plasma Wayland handling, which covers the mirror-image case.
- Replace the unreliable `ydotool type ""` probe (exits 0 even with no daemon)
with _is_ydotoold_running(), so a daemonless ydotool install correctly falls
back to wtype instead of selecting a no-op ydotool.
- Add unit tests for the compositor gate, the ydotoold check, and that an
active-IBus COSMIC session selects wtype.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(text_injection): cover ydotoold socket-env and ydotool direct-mode paths
Add tests for the two new branches codecov/patch flagged as uncovered:
the explicit YDOTOOL_SOCKET path in _is_ydotoold_running(), and the
ydotool direct-mode fallback when no daemon and no wtype are available.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>