several wayland fixes, new util function MwIsUTF8 so that both backends can consistently check if something is a valid utf8

This commit is contained in:
IoIxD 2026-03-27 15:14:04 -07:00
commit 4d694bba49
5 changed files with 182 additions and 66 deletions

View file

@ -558,8 +558,7 @@ static void MwLLNextEventImpl(MwLL handle) {
strcpy(str, s);
}
/* HACK: this is bad, you can guess why */
if(strlen(str) == 1) {
if(MwIsKeyUTF8(sym)) {
char s = str[0];
if(ev.xkey.state & (ShiftMask | LockMask) && !(ev.xkey.state & (ControlMask | Mod1Mask))) {