On Mon May 8 07:48:55 2023 +0000, Byeongsik Jeon wrote:
There are some minor issues in v7, and some interesting good stuffs. But before we talk about that, I have one question. Is it not allowed to access "win32u/imm.c::imc->client_ptr" from the UNIX side? I tried writing a POC patchset. But it's such a simple concept that I'm wondering if there's something I'm missing. [poc_use_imc_client_ptr.patch](/uploads/1698909b42ab8fbad97976c1b4f8b042/poc_use_imc_client_ptr.patch)
You can access it, probably, but then some members such as the composition string is behind a pseudo handle, which require callbacks to access. In general we want as little callbacks as possible, and here probably, do as much as possible in imm32.
There is also the fact that I'm trying to move XIM handling, and input in general, to a separate "rawinput" thread, which will fix several long standing bugs and design issues, as well as let us implement more HID features such as touch input, in user32.
If the thread sending the updates isn't the same as the one owning the input context, you cannot safely access the input context members anymore, because it isn't synchronized with the owning thread which may be reading, or destroying them at the same time.