[gnome-shell] keyboard: Create extended keys before updating hover state



commit 7fbdaadce27305d7145fe4ec4fc7fd063ebad2c0
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Dec 4 20:01:41 2019 +0100

    keyboard: Create extended keys before updating hover state
    
    We want extended keys to have the same size as their parent key,
    but this is currently broken and the keys end up with their
    parent key's preferred size (which is smaller than its allocated
    size).
    
    This is due to the way ClutterActor's width/height properties work,
    which only return the "real" (i.e. allocated) size when the allocation
    is valid, and fall back to the preferred size otherwise.
    
    As changing an StWidget's hover state involves adding or removing
    the `:hover` pseudo class, this is currently always the case.
    Creating the extended keys first means the keyButton's allocation
    is probably valid, so do that.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/issues/1976

 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 0d40c83572..d5591c317d 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -328,9 +328,9 @@ var Key = GObject.registerClass({
 
                     if (this._extendedKeys.length > 0) {
                         this._touchPressed = false;
+                        this._ensureExtendedKeysPopup();
                         this.keyButton.set_hover(false);
                         this.keyButton.fake_release();
-                        this._ensureExtendedKeysPopup();
                         this._showSubkeys();
                     }
 


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