Skip to content

Commit

Permalink
don't call key edit on uneaten key when not composing
Browse files Browse the repository at this point in the history
skype crashes if RequestEditSession is called when its Alt menu is active
  • Loading branch information
dinhngtu committed Dec 19, 2020
1 parent 974cdc1 commit 4672d74
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions VietTypeATL/KeyEventSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,10 @@ STDMETHODIMP KeyEventSink::OnKeyDown(_In_ ITfContext* pic, _In_ WPARAM wParam, _

DBG_DPRINT(L"OnKeyDown wParam = %lx %s", wParam, *pfEaten ? L"eaten" : L"not eaten");

hr = CallKeyEdit(pic, wParam, lParam, _keyState);
HRESULT_CHECK_RETURN(hr, L"%s", L"CallKeyEdit failed");
if (*pfEaten || _compositionManager->IsComposing()) {
hr = CallKeyEdit(pic, wParam, lParam, _keyState);
HRESULT_CHECK_RETURN(hr, L"%s", L"CallKeyEdit failed");
}

return S_OK;
}
Expand Down

0 comments on commit 4672d74

Please sign in to comment.