Fix fcitx5-t9 * longpress auto-repeat and reset Ctl mode on focus/window change

This commit is contained in:
Luxferre
2026-10-21 21:04:53 +03:00
parent a31595070c
commit 9002560a38
9 changed files with 103 additions and 19 deletions
+4 -3
View File
@@ -1787,12 +1787,11 @@ focus(XEvent *ev)
{
XFocusChangeEvent *e = &ev->xfocus;
if (e->mode == NotifyGrab)
return;
if (ev->type == FocusIn) {
if (xw.ime.xic)
XSetICFocus(xw.ime.xic);
if (e->mode == NotifyGrab)
return;
win.mode |= MODE_FOCUSED;
xseturgency(0);
if (IS_SET(MODE_FOCUS))
@@ -1800,6 +1799,8 @@ focus(XEvent *ev)
} else {
if (xw.ime.xic)
XUnsetICFocus(xw.ime.xic);
if (e->mode == NotifyGrab)
return;
win.mode &= ~MODE_FOCUSED;
if (IS_SET(MODE_FOCUS))
ttywrite("\033[O", 3, 0);