Skip to content

text-backend: bridge text-input-v3 to input-method-v1 - #168

Open
abjfh30 wants to merge 3 commits into
microsoft:workingfrom
abjfh30:feature/text-input-v3-wslg
Open

text-backend: bridge text-input-v3 to input-method-v1#168
abjfh30 wants to merge 3 commits into
microsoft:workingfrom
abjfh30:feature/text-input-v3-wslg

Conversation

@abjfh30

@abjfh30 abjfh30 commented Jul 17, 2026

Copy link
Copy Markdown

Summary

  • expose the text-input-unstable-v3 manager from the Weston text backend
  • translate double-buffered text-input-v3 state to input-method-v1
  • translate preedit, commit, and surrounding-text updates back to v3
  • preserve focus, serial, inert resource, and keyboard grab semantics
  • add an end-to-end input-method helper and protocol behavior tests

Motivation

Native Wayland clients such as JetBrains Runtime use text-input-v3, but
WSLg currently exposes only input-method-v1 through its existing input
method integration. The bridge allows these clients to use the configured
input method without falling back to XWayland.

Related issues:

Testing

  • each recipe commit builds independently in the WSLg Weston build image
  • complete debug build succeeds
  • text test binary passes all 6 cases
  • ASan and UBSan text test run passes all 6 cases without reports
  • Valgrind runner and helper report 0 errors; helper frees all 244 allocations
  • git diff --check passes

abjfh30 added 3 commits July 17, 2026 17:58
The compositor needs the text-input-v3 server protocol to expose the
new manager global and translate requests to input-method-v1.

Generate the v3 protocol sources and link them into the compositor.

Signed-off-by: huyuliang <abjfh@aliyun.com>
Native Wayland clients such as JetBrains Runtime use text-input-v3,
but WSLg currently exposes only input-method-v1 through its existing
input method integration. These clients therefore cannot use the
configured input method through the native Wayland backend.

Expose the v3 manager and translate double-buffered client state to
input-method-v1. Translate preedit, commit, and surrounding-text
updates back to v3 while preserving focus, serial, and inert resource
semantics.

Signed-off-by: huyuliang <abjfh@aliyun.com>
Run the text backend in the desktop test shell and provide a small
input-method-v1 helper so the v3 bridge can be exercised end to end.

Cover state translation, stale serial delivery, enable double
buffering, cached result cleanup, competing text inputs, focus loss,
seat teardown, and inactive input-method context requests. Use a
keyboard event as an ordering barrier between the two Wayland clients.

Signed-off-by: huyuliang <abjfh@aliyun.com>
@abjfh30

abjfh30 commented Jul 17, 2026

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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