Fix fcitx5-t9 * longpress auto-repeat and reset Ctl mode on focus/window change
This commit is contained in:
+4
-3
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user