summaryrefslogtreecommitdiffstats
path: root/video/out/w32_common.c
diff options
context:
space:
mode:
authornanahi <130121847+na-na-hi@users.noreply.github.com>2023-12-15 11:29:56 -0500
committerDudemanguy <random342@airmail.cc>2024-01-15 16:06:06 +0000
commit7ffd947830193977c70b0e6a561362f3365ff40a (patch)
treeac90f03592fdf8c0634d721559df61bc0f5b94df /video/out/w32_common.c
parent2b1024fa50416feebc13d7ef49dbc19b6a9a0603 (diff)
downloadmpv-7ffd947830193977c70b0e6a561362f3365ff40a.tar.bz2
mpv-7ffd947830193977c70b0e6a561362f3365ff40a.tar.xz
win32: move IME candidate window to video window
By default the IME candidate window appears on the top left corner of the monitor. Move it to the video window for sane behavior.
Diffstat (limited to 'video/out/w32_common.c')
-rw-r--r--video/out/w32_common.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c
index 717430bb1f..d2972f9193 100644
--- a/video/out/w32_common.c
+++ b/video/out/w32_common.c
@@ -1551,6 +1551,15 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
((LPNCCALCSIZE_PARAMS) lParam)->rgrc[0].top -= get_title_bar_height(w32);
}
break;
+ case WM_IME_STARTCOMPOSITION: {
+ HIMC imc = ImmGetContext(w32->window);
+ if (imc) {
+ COMPOSITIONFORM cf = {.dwStyle = CFS_POINT, .ptCurrentPos = {0, 0}};
+ ImmSetCompositionWindow(imc, &cf);
+ ImmReleaseContext(w32->window, imc);
+ }
+ break;
+ }
}
if (message == w32->tbtn_created_msg) {