engine: a takeover keeps the text it took for the context it took it from
Two applications' focus events cross — ibus-daemon documents the case — so the first key of the new one can arrive before the old one says it lost focus. The engine dropped whatever that context was composing; it now keeps it and hands it back with the reset or release that follows, which every frontend already commits. Normal ordering is unchanged.
This commit is contained in:
@@ -234,6 +234,7 @@ engine_active_owner_lifecycle(struct ct *t)
|
||||
checkstr(t, "takeover resets old preedit", "ん", &res.preedit);
|
||||
CT_EQ_PTR(t, &b, activeowner);
|
||||
res = ownerrequest(&a, Keyreset, 0, 0);
|
||||
checkstr(t, "the taken owner gets its reading back", "か", &res.commit);
|
||||
CT_EQ_INT(t, 0, res.preedit.n);
|
||||
impre(&im, &shown);
|
||||
checkstr(t, "stale reset preserves owner", "ん", &shown);
|
||||
|
||||
Reference in New Issue
Block a user