[gnome-shell/wip/carlosg/im-untimely-preedit: 3/3] inputMethod: Do not reset invisible preedit on focus_out




commit 18182d499d41ed49bb770fa74f1f1d178e1594c3
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Oct 29 16:46:18 2021 +0200

    inputMethod: Do not reset invisible preedit on focus_out
    
    If the preedit is in invisible state, we already last sent a null
    preedit string change, there is no need to clear the preedit in that
    case.

 js/misc/inputMethod.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/misc/inputMethod.js b/js/misc/inputMethod.js
index 71dff84f58..8c3cd61aeb 100644
--- a/js/misc/inputMethod.js
+++ b/js/misc/inputMethod.js
@@ -167,7 +167,7 @@ class InputMethod extends Clutter.InputMethod {
         if (this._context)
             this._context.focus_out();
 
-        if (this._preeditStr) {
+        if (this._preeditStr && this._preeditVisible) {
             // Unset any preedit text
             this.set_preedit_text(null, 0, this._preeditCommitMode);
             this._preeditStr = null;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]