fix: assign one active engine owner

This commit is contained in:
2026-08-12 15:41:46 +09:00
parent 9c244d1dd1
commit 5ba5cf209c
14 changed files with 212 additions and 13 deletions

10
ipc.h
View File

@@ -6,7 +6,10 @@
#define IPCPATH "/tmp/strans.%d"
/*
* Request: [want-preedit, modifiers, key byte 0, ..., key byte 3].
* Request: [flags, modifiers, key byte 0, ..., key byte 3].
* Flags request preedit and distinguish lifecycle reset from physical Escape.
* The server assigns the connection's owner generation; it is not sent on
* the wire.
* Only Mmask modifier bits are retained.
* Response: [eaten, commit-length-low, commit-length-high, commit...],
* followed, when requested, by
@@ -16,6 +19,9 @@
enum
{
Ipcreqwant = 1<<0,
Ipcreqreset = 1<<1,
Kspec = 0x110000,
Kback = Kspec|0x08,
Ktab = Kspec|0x09,
@@ -48,7 +54,9 @@ struct Ipcresp
};
void ipcpackreq(unsigned char[Ipcreqsz], int, unsigned int, unsigned int);
void ipcpackreset(unsigned char[Ipcreqsz], int);
void ipcunpackreq(const unsigned char[Ipcreqsz], int*, unsigned int*, unsigned int*);
int ipcreqreset(const unsigned char[Ipcreqsz]);
int ipcpackresp(unsigned char*, size_t, int, const char*, size_t, const char*, size_t, int);
int ipcreadn(int, void*, size_t);
int ipcsend(int, const void*, size_t);