engine: the one capability is a flag
Cclientpreedit was a one-bit mask that every producer set as "want ? Cclientpreedit : 0" and every consumer masked out again; nothing else was ever going to join it. Keyreq carries clientpre, an int that says whether the client draws the preedit, and the engine and the XIM context keep it under that name.
This commit is contained in:
@@ -133,7 +133,7 @@ nexttrace(struct ct *t, Ibusfix *f, int op, Ictx *ctx)
|
||||
CT_EQ_INT(t, op, req.op);
|
||||
CT_EQ_PTR(t, ctx, req.owner);
|
||||
if(ctx != nil)
|
||||
CT_EQ_INT(t, ctx->cap & 1 ? Cclientpreedit : 0, req.cap);
|
||||
CT_EQ_INT(t, clientpreedit(ctx), req.clientpre);
|
||||
CT_EQ_PTR(t, replyc, req.reply);
|
||||
return req;
|
||||
}
|
||||
@@ -178,7 +178,7 @@ ibus_capability_policy(struct ct *t)
|
||||
checkstr(t, "preedit", "k", &res.preedit);
|
||||
CT_EQ_PTR(t, a, testengineowner());
|
||||
|
||||
a->cap = Cclientpreedit;
|
||||
a->cap = Ibuscappreedit;
|
||||
memset(&res, 0, sizeof res);
|
||||
sendrequest(a, Keycap, 0, 0, &res);
|
||||
nexttrace(t, &f, Keycap, a);
|
||||
@@ -186,7 +186,7 @@ ibus_capability_policy(struct ct *t)
|
||||
checkstr(t, "preedit", "k", &res.preedit);
|
||||
|
||||
b->focused = 1;
|
||||
b->cap = Cclientpreedit;
|
||||
b->cap = Ibuscappreedit;
|
||||
memset(&res, 0, sizeof res);
|
||||
sendrequest(b, Keycap, 0, 0, &res);
|
||||
nexttrace(t, &f, Keycap, b);
|
||||
@@ -229,7 +229,7 @@ ibus_private_input_policy(struct ct *t)
|
||||
}
|
||||
|
||||
ctx->focused = 1;
|
||||
ctx->cap = Cclientpreedit;
|
||||
ctx->cap = 1;
|
||||
ctx->purpose = 0;
|
||||
contextkey(t, &f, ctx, 'n', Testctrlmask);
|
||||
res = contextkey(t, &f, ctx, 'k', 0);
|
||||
|
||||
Reference in New Issue
Block a user