Files
voculinux/src/vocalinux
ca40f7d8b0 fix(text-injection): keep Alt+Shift/Win+Space layout switching on GNOME Wayland (#876)
* fix(text-injection): restore full GNOME XKB map on XWayland after inject

sync_xwayland_layout_from_gnome wrote only the single active input
source via 'setxkbmap -layout <one>'. That left XWayland with a
one-group keymap: Alt+Shift 'grp:' toggles and the group index Mutter
drives for Win+Space became no-ops for every X11/XWayland client until
relogin.

Apply GNOME's complete XKB map instead: every xkb input source in
'sources' order plus all 'xkb-options', and only when the live rules
differ (which also keeps inject from resetting the active group).

Refs #848

* fix(text-injection): harden XWayland repair against bad reads and non-GNOME sessions

Three Greptile P1s on f005b6c:

- _read_gnome_input_sources_key now returns [] for a successfully read
  empty list, reserving None for unreadable keys. _get_gnome_xkb_keymap
  bails when the xkb-options read fails instead of treating it as an
  empty list, so a transient gsettings failure can no longer make the
  repair clear live XWayland options via 'setxkbmap -option ""'.

- _get_gnome_xkb_keymap restores the GNOME-session guard the previous
  source reader had, so a stale org.gnome.desktop.input-sources schema
  on another Wayland desktop is never applied to that desktop's
  XWayland server.

- _query_xserver_xkb_rules catches OSError, not just FileNotFoundError:
  launch failures like PermissionError run inside inject_text's finally
  and must not surface after a successful commit.

---------

Co-authored-by: Jatin K Malik <jatinkrmalik@gmail.com>
2026-09-30 00:48:17 -07:00
..
2026-09-16 00:18:09 -07:00
2026-09-16 00:18:09 -07:00