Skip to content

Implement experimental input method protocol #495

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dcz-self
Copy link

With popup additions: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/407

Missing/untested: repositioning.

@dcz-self
Copy link
Author

To test:

# in anvil
cargo run --release -- --winit &
WAYLAND_DISPLAY=wayland-1 yad &
# in stiwri
WAYLAND_DISPLAY=wayland-1 cargo run --release --bin im_popup

@dcz-self dcz-self force-pushed the im3_popup branch 3 times, most recently from 0b32f82 to 9fe9cbd Compare May 25, 2025 09:40
@dcz-self
Copy link
Author

Repositioning has been tested now:

WAYLAND_DISPLAY=wayland-1 cargo run --release --bin im_popup_reposition
Screencast_20250524_202116.webm

@dcz-self dcz-self force-pushed the im3_popup branch 2 times, most recently from 95f4e5a to a4c69a5 Compare May 25, 2025 09:46
}

pub fn delete_surrounding_text(&self, before_length: u32, after_length: u32) {
// TODO: this has 2 separate behaviours:
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure that I understand the difference in the protocol. The preedit text is just removed in the case that it is present, and otherwise it works the same, right?

Copy link
Author

Choose a reason for hiding this comment

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

No, the preedit is not affected by this. That's actually a mistake, I should have typed "surrounding_text". When the surrounding text is reported, this can count bytes to arrive at the right spot. When it's not reported, the input method has no way to know what it deletes.

@dcz-self
Copy link
Author

Bump. Anyone interested?

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