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:
6
srv.c
6
srv.c
@@ -67,7 +67,7 @@ srvreadreq(int fd, Keyreq *kr, int *want)
|
||||
}
|
||||
|
||||
/*
|
||||
* One Keyreq persists for the connection: the negotiated capability and
|
||||
* One Keyreq persists for the connection: the negotiated preedit and
|
||||
* the last caret ride along with every request, and the socket closing
|
||||
* releases the engine.
|
||||
*/
|
||||
@@ -85,10 +85,10 @@ clientthread(void *arg)
|
||||
memset(&kr, 0, sizeof kr);
|
||||
kr.reply = chancreate(sizeof(Keyres), 0);
|
||||
kr.owner = &fd;
|
||||
kr.cap = Cclientpreedit;
|
||||
kr.clientpre = 1;
|
||||
while(srvreadreq(fd, &kr, &want) >= 0){
|
||||
if(kr.op != Keycaret)
|
||||
kr.cap = want ? Cclientpreedit : 0;
|
||||
kr.clientpre = want;
|
||||
chansend(keyc, &kr);
|
||||
chanrecv(kr.reply, &res);
|
||||
if(kr.op == Keycaret)
|
||||
|
||||
Reference in New Issue
Block a user