diff options
author | nanahi <130121847+na-na-hi@users.noreply.github.com> | 2023-12-10 01:31:12 -0500 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-12-10 14:55:41 +0100 |
commit | 5cc810e7f84256bb606bc8fe0514238af98bc191 (patch) | |
tree | c8542d80866ec1d039ecbbf35ec728819aaa827a /video/out/x11_common.c | |
parent | 443c2487d7dd1039e297abad6398135b3c463018 (diff) | |
download | mpv-5cc810e7f84256bb606bc8fe0514238af98bc191.tar.bz2 mpv-5cc810e7f84256bb606bc8fe0514238af98bc191.tar.xz |
x11_common: fix compose key handling
Compose key doesn't function in X11 because XFilterEvent() isn't called,
and XNInputStyle is set to a wrong value. This results in KeyPress events
for the separate keyboard inputs in the compose key input sequence
instead of the composed character, making it impossible to input certain
characters which require compose key.
Fix this by calling the required XFilterEvent() and set XNInputStyle
to the correct value.
Diffstat (limited to 'video/out/x11_common.c')
-rw-r--r-- | video/out/x11_common.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c index d006445cdb..bae2918157 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -1177,6 +1177,8 @@ void vo_x11_check_events(struct vo *vo) while (XPending(display)) { XNextEvent(display, &Event); + if (XFilterEvent(&Event, x11->window)) + continue; MP_TRACE(x11, "XEvent: %d\n", Event.type); switch (Event.type) { case Expose: @@ -1579,7 +1581,7 @@ static void vo_x11_create_window(struct vo *vo, XVisualInfo *vis, if (x11->xim) { x11->xic = XCreateIC(x11->xim, - XNInputStyle, XIMPreeditNone | XIMStatusNone, + XNInputStyle, XIMPreeditNothing | XIMStatusNothing, XNClientWindow, x11->window, XNFocusWindow, x11->window, NULL); |