Commit 85be8550 authored by Dorota Czaplejewicz's avatar Dorota Czaplejewicz
Browse files

text input: Disable erasing

Erasing with zwp_text_input_v3 version 1 requires bytes, and bytes require get_surrounding_text. That, however, is optional. That's a mistake in protocol design.

Easiest to drop this until the mess is solved on the protocol side.
parent a57a78aa
...@@ -139,6 +139,9 @@ impl Submission { ...@@ -139,6 +139,9 @@ impl Submission {
Err(imservice::SubmitError::NotActive) => false, Err(imservice::SubmitError::NotActive) => false,
} }
}, },
/* Delete_surrounding_text takes byte offsets,
* so cannot work without get_surrounding_text.
* This is a bug in the protocol.
(Some(imservice), Action::Erase) => { (Some(imservice), Action::Erase) => {
let submit_result = imservice.delete_surrounding_text(1, 0) let submit_result = imservice.delete_surrounding_text(1, 0)
.and_then(|_| imservice.commit()); .and_then(|_| imservice.commit());
...@@ -146,7 +149,7 @@ impl Submission { ...@@ -146,7 +149,7 @@ impl Submission {
Ok(()) => true, Ok(()) => true,
Err(imservice::SubmitError::NotActive) => false, Err(imservice::SubmitError::NotActive) => false,
} }
} }*/
(_, _) => false, (_, _) => false,
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment