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:
@@ -1059,9 +1059,12 @@ xim_adapter_callback_owner_loss(struct ct *t)
|
||||
checkpreowner();
|
||||
notrace(t, &f);
|
||||
|
||||
/* Late XIM lifecycle messages remain idempotent after owner cleanup. */
|
||||
/* The release hands back the reading the takeover took. */
|
||||
release(&state);
|
||||
nexttrace(t, &f, Keyrelease, &state);
|
||||
CT_EQ_INT(t, 5, nwirecalls);
|
||||
CT_EQ_INT(t, Wcommit, wirecalls[4].op);
|
||||
/* Late XIM lifecycle messages remain idempotent after owner cleanup. */
|
||||
release(&state);
|
||||
notrace(t, &f);
|
||||
memset(&hdr, 0, sizeof hdr);
|
||||
@@ -1071,7 +1074,7 @@ xim_adapter_callback_owner_loss(struct ct *t)
|
||||
hdr.major_opcode = XCB_XIM_DESTROY_IC;
|
||||
callback(nil, nil, ic, &hdr, nil, nil, nil);
|
||||
notrace(t, &f);
|
||||
CT_EQ_INT(t, 4, nwirecalls);
|
||||
CT_EQ_INT(t, 5, nwirecalls);
|
||||
|
||||
memset(&req, 0, sizeof req);
|
||||
req.owner = &foreign;
|
||||
|
||||
Reference in New Issue
Block a user