Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for setting the IME purpose #2650

Merged
merged 1 commit into from
Jan 29, 2023

Conversation

lukaslihotzki
Copy link
Contributor

Wayland and macOS support IME purposes. I have implemented it for Wayland only, because I don't have access to macOS. XIM and Windows IMM do not seem to support it. (Although #2614 removes XIM and the successor may support IME purposes.)

This PR adds the purpose Password (directly supported by both Wayland and macOS) and Terminal (needed for alacritty/alacritty#6644). I don't know if it makes sense to support more purposes (for example, all that Wayland supports). The ImePurpose enum is non exhaustive, so new purposes can be added without breaking change.

  • Tested on all platforms changed
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality (added to the ime example, although the ime example does not work at all on Wayland because no window shows up)
  • Updated feature matrix, if new features were added or implemented (IME is not contained in the feature matrix)

Copy link
Member

@jackpot51 jackpot51 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orbital code looks good

Copy link
Member

@kchibisov kchibisov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API looks fine, though we might want to change IME stuff to do a single apply with some ImeStateUpdate, so we can utilize the atomicness of some of the underlying APIs.

CHANGELOG.md Outdated Show resolved Hide resolved
src/platform_impl/linux/mod.rs Outdated Show resolved Hide resolved
@lukaslihotzki lukaslihotzki requested review from kchibisov and removed request for msiglreith and madsmtm January 27, 2023 04:44
@lukaslihotzki lukaslihotzki force-pushed the ime-purpose branch 2 times, most recently from 13641c8 to 71f16a6 Compare January 27, 2023 05:01
src/window.rs Outdated Show resolved Hide resolved
src/window.rs Show resolved Hide resolved
src/window.rs Outdated Show resolved Hide resolved
src/window.rs Outdated Show resolved Hide resolved
src/window.rs Outdated Show resolved Hide resolved
src/window.rs Show resolved Hide resolved
src/window.rs Outdated Show resolved Hide resolved
src/window.rs Show resolved Hide resolved
This adds a way to set the purpose for the IME input, implemented
only on Wayland for now.
@kchibisov kchibisov merged commit 1b4045d into rust-windowing:master Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants