fix(xim): honor reset and X11 keyboard state

This commit is contained in:
2026-08-14 22:34:37 +09:00
parent 9804c1f55c
commit a637f457f7
10 changed files with 394 additions and 258 deletions

View File

@@ -11,6 +11,8 @@ ximutf8compound(const char *s, size_t len, size_t *outlen)
char *ct;
size_t n;
if(outlen != NULL)
*outlen = 0;
if(s == NULL || len > SIZE_MAX - (sizeof begin + sizeof end - 1))
return NULL;
n = len + sizeof begin + sizeof end - 2;
@@ -31,6 +33,8 @@ ximcompound(const char *s, size_t len, size_t *outlen)
{
char *ct;
if(outlen != NULL)
*outlen = 0;
if(s == NULL)
return NULL;
ct = xcb_utf8_to_compound_text(s, len, outlen);