mpv/video
nanahi 4ab1ab8284 video/out/x11_common: make IME work (for libmpv usage)
The implementation is minimal since it already uses XIM for UTF-8 text
input. The only changes needed are small fixes: setting the IC focus and
correct the usage of window param for XFilterEvent, and IME will
"just work"...

...after setting 2 process-wide global values before VO creation:
LC_CTYPE and X locale modifiers. So this usage is currently limited to
libmpv clients which don't want to do their own IME processing.

locale strikes once again:
XIM input methods require them to be set before creating the XIM context to
work, even though they don't matter after the context is created. Both of
these values being process-wide global means that the only time to safely
set these values is before the process creates any thread.

In theory, mpv could set LC_CTYPE in the main when running standalone,
but locale being locale means something is always messed up. In this case,
setting LC_CTYPE changes "Character classification and case conversion"
behavior. While mpv uses its own ASCII-only is*() and to*() functions to
avoid some of the issues, it also uses strcasecmp() and POSIX regex which
behaviors are affected by LC_CTYPE.

In summary, to avoid unavoidable race conditions mpv won't do this in
standalone mode right now.
It's now libmpv users' responsibility to:

- set LC_CTYPE to a locale usable for XIM, such as a UTF-8 locale
- set X locale modifiers with XSetLocaleModifiers
- hope that all stars align if trying to switch locale back afterwards

On most setups, both of these can be empty strings, In this case, the usual
XMODIFIERS environment variable must be set to enable IME support.
(e.g. XMODIFIERS=@im=fcitx)
2024-10-14 02:05:17 +02:00
..
decode various: remove global.h inclusion where not needed 2024-10-01 12:23:44 +02:00
filter vf_format: set original params when converting format 2024-10-06 22:01:37 +02:00
out video/out/x11_common: make IME work (for libmpv usage) 2024-10-14 02:05:17 +02:00
csputils.c video/csputils: remove space from choice option for chroma loc 2024-08-24 17:11:39 +02:00
csputils.h
cuda.c
d3d.c
d3d.h
drmprime.c
fmt-conversion.c
fmt-conversion.h
hwdec.c video: hwdec: extend look up of hwdecs to consider device type as well 2024-08-10 14:24:36 -07:00
hwdec.h hwdec_vaapi: try format upload lazily 2024-10-12 01:36:44 +02:00
image_loader.c
image_loader.h
image_writer.c various: remove no longer needed availability checks 2024-06-22 16:12:14 +02:00
image_writer.h
img_format.c img_format: prevent an offset >= MP_MAX_PLANES into bpp 2024-08-13 12:35:27 +02:00
img_format.h
mp_image.c mp_image: restore dovi metadata before converting to AVFrame 2024-10-06 22:01:37 +02:00
mp_image.h mp_image: save fallback colorspace when dovi metadata is present 2024-09-01 19:41:25 +02:00
mp_image_pool.c meson: require Vulkan loader/headers >= 1.3.238 2024-09-14 17:20:16 +02:00
mp_image_pool.h
repack.c
repack.h
sws_utils.c various: remove no longer needed availability checks 2024-06-22 16:12:14 +02:00
sws_utils.h
vaapi.c
vaapi.h
vdpau.c
vdpau.h
vdpau_functions.inc
vdpau_mixer.c
vdpau_mixer.h
zimg.c
zimg.h