Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions openless-all/app/src-tauri/src/windows_ime_ipc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::time::Duration;
use crate::windows_ime_protocol::ImeSubmitStatus;

pub const IME_CLIENT_WAIT_TIMEOUT: Duration = Duration::from_millis(700);
const IME_OWNER_THREAD_MESSAGE_TIMEOUT_MS: u64 = 3000;
const IME_ASYNC_EDIT_SESSION_TIMEOUT_MS: u64 = 3000;
const IME_OWNER_THREAD_MESSAGE_TIMEOUT_MS: u64 = 2000;
const IME_ASYNC_EDIT_SESSION_TIMEOUT_MS: u64 = 2000;
const IME_SUBMIT_TIMEOUT_MARGIN_MS: u64 = 1000;
const IME_NATIVE_ASYNC_COMMIT_TIMEOUT_MS: u64 =
IME_OWNER_THREAD_MESSAGE_TIMEOUT_MS + IME_ASYNC_EDIT_SESSION_TIMEOUT_MS;
Expand Down Expand Up @@ -395,6 +395,11 @@ mod tests {
assert!(IME_SUBMIT_TIMEOUT > Duration::from_millis(IME_NATIVE_ASYNC_COMMIT_TIMEOUT_MS));
}

#[test]
fn submit_timeout_stays_within_followup_stall_budget() {
assert_eq!(IME_SUBMIT_TIMEOUT, Duration::from_millis(5000));
}

#[test]
fn wait_pipe_error_mapping_treats_missing_or_busy_pipe_as_no_ready_client() {
assert_eq!(
Expand Down
2 changes: 1 addition & 1 deletion openless-all/app/windows-ime/src/text_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace {

constexpr wchar_t kMessageWindowClassName[] = L"OpenLessImeMessageWindow";
constexpr UINT kSubmitTextMessage = WM_APP + 1;
constexpr UINT kSubmitTextTimeoutMs = 3000;
constexpr UINT kSubmitTextTimeoutMs = 2000;

struct SubmitTextRequest {
const std::wstring* session_id = nullptr;
Expand Down
Loading