Skip to content

feat: input-method-v1#1950

Open
WantenMN wants to merge 5 commits intoSmithay:masterfrom
WantenMN:feat/input-method-v1
Open

feat: input-method-v1#1950
WantenMN wants to merge 5 commits intoSmithay:masterfrom
WantenMN:feat/input-method-v1

Conversation

@WantenMN
Copy link
Copy Markdown

@WantenMN WantenMN commented Mar 2, 2026

Description

This PR introduces protocol handling for the unstable v1 IME stack:

  • zwp_input_method_v1
  • zwp_text_input_manager_v1 / zwp_text_input_v1
  • zwp_input_panel_v1 / zwp_input_panel_surface_v1

It adds a new wayland::input_method_v1 module and exports it from wayland::mod.

What is included:

  • New manager state: InputMethodV1ManagerState
    • Creates and exposes globals for input-method-v1, text-input-v1 and input-panel-v1.
    • Supports client filtering through the same global filter pattern used in Smithay modules.
  • New compositor callback trait: InputMethodV1Handler
    • new_popup
    • dismiss_popup
    • popup_repositioned
    • parent_geometry
  • Popup lifecycle support for zwp_input_panel_surface_v1
    • Tracks popup parent surface and logical geometry.
    • Updates popup placement from text-input cursor rectangle changes.
  • Text-input <-> input-method bridging
    • Activation/deactivation wiring.
    • Forwarding of surrounding text, content type, preferred language, state commits and actions.
    • Forwarding of commit/preedit/delete/cursor/modifier/language/direction events from IME context back to active text input.
  • Keyboard integration
    • Supports grab_keyboard on IME context.
    • Sends keymap/repeat info/modifiers to IME keyboard resource.
    • Forwards key/modifier events to focused keyboards where appropriate.
  • Delegate macro for downstream compositors:
    • delegate_input_method_manager_v1!

API/docs polish:

  • Added rustdoc comments for the public API exposed by wayland::input_method_v1.
  • Kept behavior unchanged while improving maintainability/readability of the public surface.

Validation:

  • cargo fmt --all
  • cargo check -q
  • cargo test -q --lib (72 passed)

Related issue:

Checklist

[ x ] I agree to smithay's Developer Certificate of Origin.

@WantenMN WantenMN force-pushed the feat/input-method-v1 branch from 6b04843 to fab374c Compare March 2, 2026 13:32
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.

Would a input-method-v1 implementation be accepted?

1 participant