ibus: keep only the content purpose; nothing read the hints

This commit is contained in:
2026-08-16 16:58:12 +09:00
parent 8831b84ffc
commit 03c196a7f6
2 changed files with 10 additions and 17 deletions

View File

@@ -285,12 +285,11 @@ cleanup:
void
ibus_private_input_policy(struct ct *t)
{
static const struct { u32int purpose, hints; int want; } cases[] = {
{ 0, 0, 0 },
{ Ibuspurposepassword, 0, 1 },
{ Ibuspurposepin, 0, 1 },
{ 0, 1<<11, 0 },
{ 37, 1<<20, 0 },
static const struct { u32int purpose; int want; } cases[] = {
{ 0, 0 },
{ Ibuspurposepassword, 1 },
{ Ibuspurposepin, 1 },
{ 37, 0 },
};
Ibusfix f;
Ictx *ctx;
@@ -304,14 +303,12 @@ ibus_private_input_policy(struct ct *t)
goto cleanup;
for(i = 0; i < nelem(cases); i++){
ctx->purpose = cases[i].purpose;
ctx->hints = cases[i].hints;
CT_EQ_INT(t, cases[i].want, hidden(ctx));
}
ctx->focused = 1;
ctx->cap = Cclientpreedit;
ctx->purpose = 0;
ctx->hints = 0;
contextkey(t, &f, ctx, 'n', Testctrlmask);
res = contextkey(t, &f, ctx, 'k', 0);
checkstr(t, "preedit", "k", &res.preedit);
@@ -323,7 +320,6 @@ ibus_private_input_policy(struct ct *t)
checkenginepreedit(t, "k");
ctx->purpose = 0;
ctx->hints = 1<<11;
res = contextkey(t, &f, ctx, 'a', 0);
checkstr(t, "preedit", "", &res.preedit);
cleanup: