Skip to content

input-method-v1: track/render popups and adapt virtual keyboard integration for new Smithay API#3543

Draft
WantenMN wants to merge 2 commits intoniri-wm:mainfrom
WantenMN:feat/input-method-v1
Draft

input-method-v1: track/render popups and adapt virtual keyboard integration for new Smithay API#3543
WantenMN wants to merge 2 commits intoniri-wm:mainfrom
WantenMN:feat/input-method-v1

Conversation

@WantenMN
Copy link

@WantenMN WantenMN commented Mar 2, 2026

Summary

This PR adds end-to-end handling for input-method-v1 popups (IME candidate/panel surfaces) and updates niri's virtual keyboard integration to match current Smithay behavior.

What changed

  • Added InputMethodV1ManagerState initialization and storage in compositor state.
  • Implemented InputMethodV1Handler in State:
    • track popup lifecycle (new_popup, popup_repositioned, dismiss_popup),
    • update popup scale/transform from the target output,
    • compute parent geometry through window/layout context.
  • Added rendering of tracked input-method-v1 popup surfaces in the output render pass.
  • Added commit-time redraw handling for input-method-v1 popup commits.
  • Simplified protocols/virtual_keyboard.rs to delegate to Smithay's current virtual keyboard manager flow.

Why

With the current Smithay stack, niri needs explicit input-method-v1 popup management to correctly place and render IME candidate surfaces and to ensure redraws happen when those surfaces commit.

In parallel, virtual keyboard request handling is now provided inside Smithay, so the previous custom event bridging in niri is no longer the right integration point.

Merge dependency

This PR depends on Smithay changes and should only be merged after:

@WantenMN WantenMN marked this pull request as draft March 2, 2026 10:33
@WantenMN WantenMN force-pushed the feat/input-method-v1 branch from 9c40698 to 60f06b7 Compare March 2, 2026 13:30
@Atan-D-RP4
Copy link

Does this resolve #3274?

@Sempyos
Copy link
Member

Sempyos commented Mar 3, 2026

I would note.
Smithay/smithay#1937

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.

3 participants