Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorHarley Acheson <harley.acheson@gmail.com>2021-08-05 00:30:16 +0300
committerHarley Acheson <harley.acheson@gmail.com>2021-08-05 00:30:16 +0300
commit07b702f82846322df4b0b6065db90d7e3ebf3eb1 (patch)
tree71dd3c065889444a5ab63dfb3fecd2a7862897d1 /intern
parent1d1020b79ff3ac9cc23921aa2e7ba1ef16c930ce (diff)
Win32 IME: Rename SetInputLanguage()
GHOST_ImeWin32::SetInputLanguage() has a confusing name because it does not set the input language. It actually retrieves the current input locale from the OS and caches the value of the current input language ID. Therefore this patch renames it to "UpdateInputLanguage" Differential Revision: https://developer.blender.org/D12134 Reviewed by Ray Molenkamp
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_ImeWin32.cpp8
-rw-r--r--intern/ghost/intern/GHOST_ImeWin32.h4
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp4
3 files changed, 8 insertions, 8 deletions
diff --git a/intern/ghost/intern/GHOST_ImeWin32.cpp b/intern/ghost/intern/GHOST_ImeWin32.cpp
index f6baa601db9..343f4d68078 100644
--- a/intern/ghost/intern/GHOST_ImeWin32.cpp
+++ b/intern/ghost/intern/GHOST_ImeWin32.cpp
@@ -46,13 +46,13 @@ GHOST_ImeWin32::~GHOST_ImeWin32()
{
}
-void GHOST_ImeWin32::SetInputLanguage()
+void GHOST_ImeWin32::UpdateInputLanguage()
{
/**
- * Retrieve the current input language.
+ * Store the current input language.
*/
- HKL keyboard_layout = ::GetKeyboardLayout(0);
- input_language_id_ = LOWORD(keyboard_layout);
+ HKL input_locale = ::GetKeyboardLayout(0);
+ input_language_id_ = LOWORD(input_locale);
}
WORD GHOST_ImeWin32::GetInputLanguage()
diff --git a/intern/ghost/intern/GHOST_ImeWin32.h b/intern/ghost/intern/GHOST_ImeWin32.h
index 7ccb0cdfd06..d430a7d745d 100644
--- a/intern/ghost/intern/GHOST_ImeWin32.h
+++ b/intern/ghost/intern/GHOST_ImeWin32.h
@@ -88,7 +88,7 @@ class GHOST_EventIME : public GHOST_Event {
* An application CAN call ::DefWindowProc().
* 2.5. WM_INPUTLANGCHANGE (0x0051)
* Call the functions listed below:
- * - GHOST_ImeWin32::SetInputLanguage().
+ * - GHOST_ImeWin32::UpdateInputLanguage().
* An application CAN call ::DefWindowProc().
*/
@@ -149,7 +149,7 @@ class GHOST_ImeWin32 {
/**
* Retrieves the input language from Windows and update it.
*/
- void SetInputLanguage();
+ void UpdateInputLanguage();
/* Returns the current input language id. */
WORD GetInputLanguage();
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index 60fd175dbf7..347067eae50 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -1424,7 +1424,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
case WM_INPUTLANGCHANGE: {
system->handleKeyboardChange();
#ifdef WITH_INPUT_IME
- window->getImeInput()->SetInputLanguage();
+ window->getImeInput()->UpdateInputLanguage();
window->getImeInput()->UpdateConversionStatus(hwnd);
#endif
break;
@@ -1471,7 +1471,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
}
case WM_IME_SETCONTEXT: {
GHOST_ImeWin32 *ime = window->getImeInput();
- ime->SetInputLanguage();
+ ime->UpdateInputLanguage();
ime->CreateImeWindow(hwnd);
ime->CleanupComposition(hwnd);
ime->CheckFirst(hwnd);