mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 09:23:03 -04:00
oops, broke the logic for that close ime fix, hopefully this will work
This commit is contained in:
parent
71a5efcfd6
commit
79a7b7c5da
@ -1131,7 +1131,6 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
|
|||||||
// we don't want to send the current composition string in that
|
// we don't want to send the current composition string in that
|
||||||
// case. But we do need to return 0 to tell windows not to try
|
// case. But we do need to return 0 to tell windows not to try
|
||||||
// to send the composition string through WM_CHAR messages.
|
// to send the composition string through WM_CHAR messages.
|
||||||
if (_ime_active) {
|
|
||||||
HIMC hIMC = ImmGetContext(hwnd);
|
HIMC hIMC = ImmGetContext(hwnd);
|
||||||
nassertr(hIMC != 0, 0);
|
nassertr(hIMC != 0, 0);
|
||||||
|
|
||||||
@ -1151,6 +1150,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
|
|||||||
// functions to use.
|
// functions to use.
|
||||||
|
|
||||||
if (lparam & GCS_RESULTSTR) {
|
if (lparam & GCS_RESULTSTR) {
|
||||||
|
if (_ime_active) {
|
||||||
windisplay_cat.debug() << "GCS_RESULTSTR\n";
|
windisplay_cat.debug() << "GCS_RESULTSTR\n";
|
||||||
result_size = ImmGetCompositionStringW(hIMC, GCS_RESULTSTR,
|
result_size = ImmGetCompositionStringW(hIMC, GCS_RESULTSTR,
|
||||||
ime_result, max_ime_result);
|
ime_result, max_ime_result);
|
||||||
@ -1169,6 +1169,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
|
|||||||
_input_devices[0].keystroke(result);
|
_input_devices[0].keystroke(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (lparam & GCS_COMPSTR) {
|
if (lparam & GCS_COMPSTR) {
|
||||||
windisplay_cat.debug() << "GCS_COMPSTR\n";
|
windisplay_cat.debug() << "GCS_COMPSTR\n";
|
||||||
/*
|
/*
|
||||||
@ -1203,7 +1204,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
|
|||||||
_input_devices[0].candidate(can_t, min(cursor_pos, delta_start), max(cursor_pos, delta_start), cursor_pos);
|
_input_devices[0].candidate(can_t, min(cursor_pos, delta_start), max(cursor_pos, delta_start), cursor_pos);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (lparam & GCS_RESULTSTR) {
|
if ((lparam & GCS_RESULTSTR) && _ime_active) {
|
||||||
// On the other hand, ImmGetCompositionStringW() doesn't
|
// On the other hand, ImmGetCompositionStringW() doesn't
|
||||||
// work on Win95 or Win98; for these OS's we must use
|
// work on Win95 or Win98; for these OS's we must use
|
||||||
// ImmGetCompositionStringA().
|
// ImmGetCompositionStringA().
|
||||||
@ -1231,7 +1232,6 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
|
|||||||
|
|
||||||
ImmReleaseContext(hwnd, hIMC);
|
ImmReleaseContext(hwnd, hIMC);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_CHAR:
|
case WM_CHAR:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user