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:
2026-08-17 10:57:15 +09:00
parent 33023d7f51
commit 88ad5f7630
10 changed files with 53 additions and 57 deletions

8
dat.h
View File

@@ -173,10 +173,6 @@ struct Popup
typedef struct Keyreq Keyreq;
typedef struct Keyres Keyres;
enum
{
Cclientpreedit = 1<<0,
};
enum
{
Keypress,
Keyreset,
@@ -186,7 +182,7 @@ enum
};
struct Keyres
{
int eaten; /* Keycap: caller is active and capability was applied. */
int eaten; /* Keycap: the caller is the owner and clientpre took. */
Str commit;
Str preedit;
};
@@ -194,7 +190,7 @@ struct Keyres
struct Keyreq
{
void *owner; /* stable until the context's release is acknowledged */
int cap;
int clientpre; /* the client draws the preedit; the popup does not */
int op;
u32int ks;
u32int mod;