fix(ipc): preserve legacy preedit and bound client waits
This commit is contained in:
8
srv.c
8
srv.c
@@ -60,7 +60,7 @@ clientthread(void *arg)
|
||||
Caret caret;
|
||||
uchar out[Ipcmaxresp];
|
||||
char commit[Maxutf], preedit[Maxutf];
|
||||
int cap, n, ncommit, npreedit, type, want;
|
||||
int cap, n, ncommit, negotiated, npreedit, type, want;
|
||||
uchar token;
|
||||
|
||||
fd = (int)(uintptr)arg;
|
||||
@@ -69,11 +69,15 @@ clientthread(void *arg)
|
||||
kr.reply = reply;
|
||||
kr.owner = &fd;
|
||||
cap = Cclientpreedit;
|
||||
negotiated = 0;
|
||||
memset(&caret, 0, sizeof caret);
|
||||
kr.cap = cap;
|
||||
kr.caret = caret;
|
||||
while((type = srvreadreq(fd, &kr, &want)) >= 0){
|
||||
if(type == Ipccap)
|
||||
if(type == Ipccap){
|
||||
cap = want ? Cclientpreedit : 0;
|
||||
negotiated = 1;
|
||||
}else if(type == Ipclegacy && !negotiated)
|
||||
cap = want ? Cclientpreedit : 0;
|
||||
else if(type == Ipccaret)
|
||||
caret = kr.caret;
|
||||
|
||||
Reference in New Issue
Block a user