* fix(text-injection): detect if IBus is the active input method before using it
This commit fixes issue #249 where Vocalinux incorrectly tries to use
IBus for text injection when IBus is installed but not configured as
the active input method (e.g., user uses ydotool on Arch + KDE Plasma 6).
Changes:
- Add is_ibus_active_input_method() function that checks GTK_IM_MODULE,
QT_IM_MODULE, and XMODIFIERS environment variables to determine if
IBus is the active input method
- Update _check_dependencies() to skip IBus when it's not the active
input method, falling back to ydotool/wtype/xdotool instead
- Add comprehensive unit tests for the new functionality
The fix ensures Vocalinux will use the appropriate text injection
method based on the user's actual input method configuration,
rather than just checking if IBus is installed.
Fixes#249
* test: fix existing tests to mock is_ibus_active_input_method
* test: add comprehensive test coverage for is_ibus_active_input_method
Add additional tests to ensure complete coverage of the new functionality:
- Edge cases for empty string env vars
- Case-insensitive detection for all three env vars
- Priority ordering (GTK > Qt > XMODIFIERS)
- X11 fallback when IBus is not active input method
- Exception handling during IBus setup falls back correctly
Total tests: 62 (was 54), all passing.