[Bf-blender-cvs] [1d1020b79ff] master: Win32 IME: Remove ime_status_

Harley Acheson noreply at git.blender.org
Wed Aug 4 22:20:54 CEST 2021


Commit: 1d1020b79ff3ac9cc23921aa2e7ba1ef16c930ce
Author: Harley Acheson
Date:   Wed Aug 4 13:19:16 2021 -0700
Branches: master
https://developer.blender.org/rB1d1020b79ff3ac9cc23921aa2e7ba1ef16c930ce

Win32 IME: Remove ime_status_

This removes one member of GHOST_ImeWin32 that is not used and cannot
be used in the future. It is holding the result of ImmIsIME, which is
whether an input language supports IME. It does not indicate that one
is in use, turned on, composing, in English mode, etc.

see D12131 for more information.

Differential Revision: https://developer.blender.org/D12131

Reviewed by Ray Molenkamp

===================================================================

M	intern/ghost/intern/GHOST_ImeWin32.cpp
M	intern/ghost/intern/GHOST_ImeWin32.h

===================================================================

diff --git a/intern/ghost/intern/GHOST_ImeWin32.cpp b/intern/ghost/intern/GHOST_ImeWin32.cpp
index 8daa07b5003..f6baa601db9 100644
--- a/intern/ghost/intern/GHOST_ImeWin32.cpp
+++ b/intern/ghost/intern/GHOST_ImeWin32.cpp
@@ -32,7 +32,6 @@
 
 GHOST_ImeWin32::GHOST_ImeWin32()
     : is_composing_(false),
-      ime_status_(false),
       input_language_id_(LANG_USER_DEFAULT),
       conversion_modes_(IME_CMODE_ALPHANUMERIC),
       sentence_mode_(IME_SMODE_NONE),
@@ -47,18 +46,13 @@ GHOST_ImeWin32::~GHOST_ImeWin32()
 {
 }
 
-bool GHOST_ImeWin32::SetInputLanguage()
+void GHOST_ImeWin32::SetInputLanguage()
 {
   /**
-   * Retrieve the current keyboard layout from Windows and determine whether
-   * or not the current input context has IMEs.
-   * Also save its input language for language-specific operations required
-   * while composing a text.
+   * Retrieve the current input language.
    */
   HKL keyboard_layout = ::GetKeyboardLayout(0);
   input_language_id_ = LOWORD(keyboard_layout);
-  ime_status_ = ::ImmIsIME(keyboard_layout);
-  return ime_status_;
 }
 
 WORD GHOST_ImeWin32::GetInputLanguage()
diff --git a/intern/ghost/intern/GHOST_ImeWin32.h b/intern/ghost/intern/GHOST_ImeWin32.h
index bcc4b6eef7c..7ccb0cdfd06 100644
--- a/intern/ghost/intern/GHOST_ImeWin32.h
+++ b/intern/ghost/intern/GHOST_ImeWin32.h
@@ -148,13 +148,8 @@ class GHOST_ImeWin32 {
 
   /**
    * Retrieves the input language from Windows and update it.
-   * Return values
-   *   * true
-   *     The given input language has IMEs.
-   *   * false
-   *     The given input language does not have IMEs.
    */
-  bool SetInputLanguage();
+  void SetInputLanguage();
 
   /* Returns the current input language id. */
   WORD GetInputLanguage();
@@ -350,15 +345,6 @@ class GHOST_ImeWin32 {
    */
   bool is_composing_;
 
-  /**
-   * This value represents whether or not the current input context has IMEs.
-   * The following table shows the list of IME status:
-   *   Value  Description
-   *   false  The current input language does not have IMEs.
-   *   true   The current input language has IMEs.
-   */
-  bool ime_status_;
-
   /**
    * The current input Language ID retrieved from Windows, which consists of:
    *   * Primary Language ID (bit 0 to bit 9), which shows a natural language



More information about the Bf-blender-cvs mailing list