Skip to content

rdprail-shell: support external input method panels - #169

Open
abjfh30 wants to merge 7 commits into
microsoft:workingfrom
abjfh30:feature/external-input-method
Open

abjfh30 wants to merge 7 commits into
microsoft:workingfrom
abjfh30:feature/external-input-method

Conversation

@abjfh30

@abjfh30 abjfh30 commented Jul 17, 2026 •

Copy link
Copy Markdown

Summary

  • add an opt-in allow-external setting for trusted external input methods while preserving the existing restriction by default
  • implement overlay and toplevel input-panel surfaces in the RDPRAIL shell
  • propagate RAIL owner and visibility changes before surface unmapping
  • track owner, output, and panel lifetimes
  • keep RDP-specific state inspection in an uninstalled test module and cover behavior through dedicated fixtures

Motivation

WSLg does not launch an input method inside the system distro. Input methods such as Fcitx5 run in the user distribution and therefore need an explicit, opt-in path to bind the privileged input-method protocol.

RDPRAIL also needs to map input-panel surfaces into remote windows so candidate windows have the correct owner, visibility, and text-cursor position.

Security

External input-method binding remains disabled by default. Enabling allow-external permits the first trusted external client to bind the privileged input-method protocol. Deployments must opt in explicitly and control which clients can connect to the compositor.

Related Pull Requests

Related Issues

Testing

  • built the RDP backend, RDPRAIL shell, test modules, and test executables against FreeRDP 2.4.0
  • input-method-bind, rdprail-input-panel, and rdprail-window-state pass
  • configured -Dbackend-rdp=true -Dshell-rdprail=false and verified that RDPRAIL input-panel test targets are not registered
  • git diff --check passes

abjfh30 added 7 commits July 17, 2026 23:52
Add an opt-in allow-external setting for deployments that start an
input method outside of Weston. The default retains the existing
client restriction.

Document that the option must only be used with trusted clients.

Signed-off-by: huyuliang <abjfh@aliyun.com>
Test the default rejection, successful external binding, rebinding
after the original client exits, and rejection of a concurrent client.

Signed-off-by: huyuliang <abjfh@aliyun.com>
Input panel surfaces need a transient owner and must send their hide state before Weston clears the surface output mask.

Extend the RDPRAIL API with owner and visibility operations. Track owner lifetime and dispatch owner or show WindowUpdate orders immediately, sharing order construction with the regular repaint path.

Append the new surface state fields to preserve existing structure offsets.

Signed-off-by: huyuliang <abjfh@aliyun.com>
Create and position views for overlay and toplevel input panel surfaces instead of leaving their role requests as no-ops.

Associate panels with the focused RAIL window and send explicit show and hide state through the backend API. Track owner, output, and panel surface lifetimes so focus or output teardown cannot leave stale pointers or remap a hidden panel.

Reject repeated role assignment as required by the input panel protocol.

Signed-off-by: huyuliang <abjfh@aliyun.com>
Exercise RAIL owner and show field construction, including every supported show-state mapping.

Use FreeRDP callbacks to verify the BeginPaint, WindowUpdate, and EndPaint dispatch sequence and the order data passed to the client.

Signed-off-by: huyuliang <abjfh@aliyun.com>
Keep RDP backend state inspection in an uninstalled RDP-specific test module instead of exposing it through the generic weston_test protocol.

Add backend-neutral test controls for output teardown, output mode changes, and surface mapping or position queries. Extend the compositor fixture with the RDP backend and RDPRAIL shell.

Signed-off-by: huyuliang <abjfh@aliyun.com>
Exercise overlay positioning at the text cursor and verify owner, show, and hide state passed to the RDP backend.

Cover repeated and mixed role assignment, panel surface destruction, output destruction, owner destruction, hide followed by show, and commits after a panel has become inert.

Signed-off-by: huyuliang <abjfh@aliyun.com>
@abjfh30 abjfh30 changed the title text-backend: allow trusted external input methods rdprail-shell: support external input method panels Jul 17, 2026
@abjfh30
abjfh30 marked this pull request as ready for review July 17, 2026 20:03
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