[gnome-shell] keyboard: Hide keyboardBox after destroying the keyboard



commit 867587ef4cb92a2f42580de8ec508198d43f4044
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Sat Mar 28 14:36:20 2020 +0100

    keyboard: Hide keyboardBox after destroying the keyboard
    
    It seems there is a weird race condition between Clutter trying to
    destroy the keyboard actor and Clutter trying to hide the keyboardBox
    container actor: If the keyboardBox is hidden before destroying the
    keyboard actor, Clutter doesn't repaint anything and the keyboard
    remains visible until something else draws over it.
    
    To fix this issue until we find the underlying Clutter bug, simply
    destroy the keyboard actor before hiding the keyboardBox. The order in
    which we call these doesn't matter anyway since hideKeyboard(true) hides
    the keyboard immediately without an animation.
    
    Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/1736
    
    https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1142

 js/ui/keyboard.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index 2cac070db5..149bafd420 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -1149,9 +1149,9 @@ var KeyboardManager = class KeyBoardManager {
             this._keyboard = new Keyboard();
         } else if (!enabled && this._keyboard) {
             this._keyboard.setCursorLocation(null);
-            Main.layoutManager.hideKeyboard(true);
             this._keyboard.destroy();
             this._keyboard = null;
+            Main.layoutManager.hideKeyboard(true);
         }
     }
 


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