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:
@@ -143,14 +143,14 @@ nextrequestcap(struct ct *t, Pump *p, int op, int cap)
|
||||
memset(&req, 0, sizeof req);
|
||||
chanrecv(p->trace, &req);
|
||||
CT_EQ_INT(t, op, req.op);
|
||||
CT_EQ_INT(t, cap, req.cap);
|
||||
CT_EQ_INT(t, cap, req.clientpre);
|
||||
return req;
|
||||
}
|
||||
|
||||
static Keyreq
|
||||
nextrequest(struct ct *t, Pump *p, int op)
|
||||
{
|
||||
return nextrequestcap(t, p, op, Cclientpreedit);
|
||||
return nextrequestcap(t, p, op, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -387,7 +387,7 @@ server_extension_stream(struct ct *t)
|
||||
goto cleanup;
|
||||
|
||||
/* Capability and caret frames may be split at any byte boundary. */
|
||||
ipcpackcap(frame, Cclientpreedit);
|
||||
ipcpackcap(frame, 1);
|
||||
if(!sendframe(t, &a, frame, Ipcreqsz, 1))
|
||||
goto cleanup;
|
||||
req = nextrequest(t, &f.pump, Keycap);
|
||||
@@ -446,7 +446,7 @@ server_extension_stream(struct ct *t)
|
||||
allowrequest(&f.pump);
|
||||
CT_EQ_INT(t, 1, readreply(t, &a, 0, "k", preedit));
|
||||
|
||||
ipcpackcap(frame, Cclientpreedit);
|
||||
ipcpackcap(frame, 1);
|
||||
if(!sendframe(t, &a, frame, Ipcreqsz, 0))
|
||||
goto cleanup;
|
||||
req = nextrequest(t, &f.pump, Keycap);
|
||||
|
||||
Reference in New Issue
Block a user