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

Wayland: Implement text_input_v3 and xkb compose #11712

Merged
merged 9 commits into from
May 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions crates/gpui/src/platform/linux/wayland/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,9 @@ impl Dispatch<wl_keyboard::WlKeyboard, ()> for WaylandClientStatePtr {
state.enter_token.take();

if let Some(window) = keyboard_focused_window {
if let Some(ref mut compose) = state.compose_state {
compose.reset();
}
state.pre_edit_text.take();
drop(state);
window.handle_ime_delete();
Expand Down Expand Up @@ -1197,6 +1200,13 @@ impl Dispatch<wl_pointer::WlPointer, ()> for WaylandClientStatePtr {
}
match button_state {
wl_pointer::ButtonState::Pressed => {
if let Some(pre_edit) = state.pre_edit_text.take() {
XDeme1 marked this conversation as resolved.
Show resolved Hide resolved
if let Some(window) = state.keyboard_focused_window.clone() {
drop(state);
window.handle_ime_commit(pre_edit);
state = client.borrow_mut();
}
}
let click_elapsed = state.click.last_click.elapsed();

if click_elapsed < DOUBLE_CLICK_INTERVAL
Expand Down