Skip to content

fix(ime): forward real serial and time in on_keysym - #31

Open
kkimdev wants to merge 1 commit into
google:virtwlfrom
kkimdev:wayland-ime-core-2-2-keysym-serial
Open

fix(ime): forward real serial and time in on_keysym#31
kkimdev wants to merge 1 commit into
google:virtwlfrom
kkimdev:wayland-ime-core-2-2-keysym-serial

Conversation

@kkimdev

@kkimdev kkimdev commented Jul 10, 2026

Copy link
Copy Markdown

Split from #30 for easier review.

wl_keyboard::key events forwarded from the IME's on_keysym handler used
serial=0 and time=0, which can cause the guest compositor to reject or
misorder them.

Fix

  • Pass the real serial and time from on_keysym instead of hardcoded 0.
  • Add store_host_serial helper and host_serial field to capture the IME
    serial for later use by commit_state (PR 7).

Changes

  • on_keysym: forward serial, time to wl_keyboard::key (opcode 3)
  • New: store_host_serial(ctx, host_id, serial)
  • New: TextInputState.host_serial (initialised to 0)
  • 3 tests

@kkimdev kkimdev changed the title Fix zero serial/time in IME-forwarded wl_keyboard::key events fix(ime): forward real serial and time in on_keysym Jul 10, 2026
@kkimdev
kkimdev marked this pull request as ready for review July 10, 2026 14:49
@InternetOfTofu
InternetOfTofu self-requested a review July 10, 2026 21:26
@InternetOfTofu

InternetOfTofu commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Hi kkimdev,

I tried to see this PR in action but was unable to reproduce it. (RUST_LOG=trace and can't see on_keysym in log).

I tried "Chinese Pinyin" and "Japanese with US keyboard" IME, but did not see this event.

Can you share how to reproduce it? or if it is not possible to repro it on a US chromebook keyboard?

Thanks!

(I'm happy to merge it if it's not possible to repro with my devices. If it is possible I want to run it before merging it)

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.

2 participants