Skip to content

Feat/wlroots keyboard layout fix - #1395

Merged
lukemarsden merged 3 commits into
mainfrom
feat/wlroots-keyboard-layout-fix
Nov 30, 2025
Merged

Feat/wlroots keyboard layout fix#1395
lukemarsden merged 3 commits into
mainfrom
feat/wlroots-keyboard-layout-fix

Conversation

@lukemarsden

Copy link
Copy Markdown
Collaborator

No description provided.

lukemarsden and others added 3 commits November 30, 2025 20:00
When running Sway as a nested compositor inside Wolf, pressing modifier
keys (Shift, Ctrl, Alt) would reset non-US keyboard layouts to US.

Root cause: The Wayland wl_keyboard.modifiers event bundles modifier
state together with layout group. wlroots calls xkb_state_update_mask()
with the parent compositor's group, overriding Sway's own layout.

Fix: Patch wlroots to add WLR_IGNORE_PARENT_KEYBOARD_LAYOUT env var.
When set to "1", wlroots preserves its own layout group instead of
accepting the parent's group value.

Implementation uses Debian packaging (dpkg-buildpackage + quilt patches)
to maintain the patch cleanly. The patched library is versioned with
-helix1 suffix (e.g., 0.17.4-2helix1).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Configure XKB_DEFAULT_LAYOUT and XKB_DEFAULT_OPTIONS for the inner
compositor (Sway). Reads from environment with sensible defaults:
- XKB_DEFAULT_LAYOUT: us,gb,fr (US, British, French)
- XKB_DEFAULT_OPTIONS: caps:ctrl_nocaps (Caps Lock as Ctrl)

This complements the wlroots patch that preserves Sway's layout when
receiving modifiers events from the outer compositor.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@lukemarsden
lukemarsden merged commit 93dadc9 into main Nov 30, 2025
8 of 9 checks passed
@lukemarsden
lukemarsden deleted the feat/wlroots-keyboard-layout-fix branch November 30, 2025 20:50
lukemarsden added a commit that referenced this pull request May 13, 2026
Adds two test cases for handleUserCreatedThread that prove Fix 2 is
correctly wired:

- TestUserCreatedThread_PhantomDraftGuard_RefusesWhenEmptyWorkSessionExists:
  spec_task already has an active work_session whose helix_session has
  zero interactions. The handler must short-circuit BEFORE calling
  CreateSession / CreateSpecTaskWorkSession / CreateSpecTaskZedThread.
  Verified to FAIL when the PHANTOM-DRAFT GUARD block in
  websocket_external_agent_sync.go is removed (gomock surfaces
  "Unexpected call to *store.MockStore.CreateSession", which is
  precisely the regression signal we want).

- TestUserCreatedThread_PhantomDraftGuard_AllowsWhenExistingSessionHasInteractions:
  positive control — when the existing work_session HAS interactions,
  the guard does not fire and the normal create path runs.

Also adds the new ListSpecTaskZedThreads mock expectation to the
existing TestUserCreatedThread_CreatesWorkSessionForSpectask so it
keeps passing under the new code path (CI build #1395 was failing
because the existing test wasn't aware of the new ListSpecTaskZedThreads
call introduced by the guard).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.

1 participant