mpv/video/out
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
..
d3d11
gpu d3d11_helpers: remove leftover variables 2024-10-06 18:24:33 +02:00
gpu_next
hwdec hwdec_vaapi: try format upload lazily 2024-10-12 01:36:44 +02:00
mac mac/common: don't unconditionally move the window on geometry changes 2024-10-05 18:40:11 +00:00
opengl various: remove global.h inclusion where not needed 2024-10-01 12:23:44 +02:00
placebo
vulkan vulkan/context: make use of VK_EXT_shader_object only if available 2024-10-10 18:37:22 +02:00
win32
wldmabuf wayland: support multiple devices and tranches when querying formats 2024-10-02 21:27:01 +00:00
android_common.c
android_common.h
aspect.c
aspect.h
bitmap_packer.c
bitmap_packer.h
cocoa_cb_common.swift mac/common: don't unconditionally move the window on geometry changes 2024-10-05 18:40:11 +00:00
dither.c
dither.h
dr_helper.c
dr_helper.h
drm_atomic.c
drm_atomic.h
drm_common.c
drm_common.h
drm_prime.c
drm_prime.h
filter_kernels.c
filter_kernels.h
libmpv.h
libmpv_sw.c
mac_common.swift mac: remove unnecessary window size change check 2024-10-06 21:53:08 +02:00
meson.build
present_sync.c
present_sync.h
vo.c
vo.h
vo_caca.c
vo_direct3d.c
vo_dmabuf_wayland.c wayland: support multiple devices and tranches when querying formats 2024-10-02 21:27:01 +00:00
vo_drm.c
vo_gpu.c various: remove global.h inclusion where not needed 2024-10-01 12:23:44 +02:00
vo_gpu_next.c vo_gpu_next: suppress tone_mapping_param deprecation warning 2024-10-12 01:08:36 +02:00
vo_image.c
vo_kitty.c
vo_lavc.c
vo_libmpv.c
vo_mediacodec_embed.c
vo_null.c
vo_sdl.c win_state: move window centering to vo_calc_window_geometry 2024-10-05 18:40:11 +00:00
vo_sixel.c
vo_tct.c
vo_vaapi.c
vo_vdpau.c
vo_wlshm.c vo_{dmabuf_wayland,wlshm}: use proper values with MP_ALIGN_{UP,DOWN} 2024-10-02 02:32:49 +00:00
vo_x11.c
vo_xv.c
w32_common.c win32: always fit to the screen on initial positioning 2024-10-11 13:26:31 +02:00
w32_common.h
wayland_common.c wayland: use wp-presentation v2 if available 2024-10-12 13:59:14 +00:00
wayland_common.h wayland: support multiple devices and tranches when querying formats 2024-10-02 21:27:01 +00:00
win_state.c win_state: move window centering to vo_calc_window_geometry 2024-10-05 18:40:11 +00:00
win_state.h win_state: move window centering to vo_calc_window_geometry 2024-10-05 18:40:11 +00:00
x11_common.c video/out/x11_common: make IME work (for libmpv usage) 2024-10-14 02:05:17 +02:00
x11_common.h