9b660f
From 7b514e637837e00372e20fa52f841e993966b734 Mon Sep 17 00:00:00 2001
9b660f
From: Umang Jain <mailumangjain@gmail.com>
9b660f
Date: Fri, 13 Dec 2019 13:36:14 +0530
9b660f
Subject: [PATCH 1/7] shellEntry: Add CapsLockWarning class
9b660f
9b660f
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/619
9b660f
---
9b660f
 data/theme/gnome-shell-sass/_common.scss |  5 +++
9b660f
 js/ui/shellEntry.js                      | 39 +++++++++++++++++++++++-
9b660f
 2 files changed, 43 insertions(+), 1 deletion(-)
9b660f
9b660f
diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
9b660f
index b1eeb0ce97..19a736ab7d 100644
9b660f
--- a/data/theme/gnome-shell-sass/_common.scss
9b660f
+++ b/data/theme/gnome-shell-sass/_common.scss
9b660f
@@ -391,6 +391,11 @@ StScrollBar {
9b660f
     padding-bottom: 8px;
9b660f
   }
9b660f
 
9b660f
+  .prompt-dialog-caps-lock-warning {
9b660f
+    @extend .prompt-dialog-error-label;
9b660f
+    padding-left: 6.2em;
9b660f
+  }
9b660f
+
9b660f
   .prompt-dialog-info-label {
9b660f
     font-size: 10pt;
9b660f
     padding-bottom: 8px;
9b660f
diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js
9b660f
index 79f1aad3e7..c1738c4064 100644
9b660f
--- a/js/ui/shellEntry.js
9b660f
+++ b/js/ui/shellEntry.js
9b660f
@@ -1,6 +1,6 @@
9b660f
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
9b660f
 
9b660f
-const { Clutter, Shell, St } = imports.gi;
9b660f
+const { Clutter, GObject, Pango, Shell, St } = imports.gi;
9b660f
 
9b660f
 const BoxPointer = imports.ui.boxpointer;
9b660f
 const Main = imports.ui.main;
9b660f
@@ -170,3 +170,40 @@ function addContextMenu(entry, params) {
9b660f
         entry._menuManager = null;
9b660f
     });
9b660f
 }
9b660f
+
9b660f
+var CapsLockWarning = GObject.registerClass(
9b660f
+class CapsLockWarning extends St.Label {
9b660f
+    _init(params) {
9b660f
+        let defaultParams = { style_class: 'prompt-dialog-error-label' };
9b660f
+        super._init(Object.assign(defaultParams, params));
9b660f
+
9b660f
+        this.text = _('Caps lock is on.');
9b660f
+
9b660f
+        this._keymap = Clutter.get_default_backend().get_keymap();
9b660f
+
9b660f
+        this.connect('notify::mapped', () => {
9b660f
+            if (this.is_mapped()) {
9b660f
+                this.stateChangedId = this._keymap.connect('state-changed',
9b660f
+                    this._updateCapsLockWarningOpacity.bind(this));
9b660f
+            } else {
9b660f
+                this._keymap.disconnect(this.stateChangedId);
9b660f
+                this.stateChangedId = 0;
9b660f
+            }
9b660f
+
9b660f
+            this._updateCapsLockWarningOpacity();
9b660f
+        });
9b660f
+
9b660f
+        this.connect('destroy', () => {
9b660f
+            if (this.stateChangedId > 0)
9b660f
+                this._keymap.disconnect(this.stateChangedId);
9b660f
+        });
9b660f
+
9b660f
+        this.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
9b660f
+        this.clutter_text.line_wrap = true;
9b660f
+    }
9b660f
+
9b660f
+    _updateCapsLockWarningOpacity() {
9b660f
+        let capsLockOn = this._keymap.get_caps_lock_state();
9b660f
+        this.opacity = capsLockOn ? 255 : 0;
9b660f
+    }
9b660f
+});
9b660f
-- 
9b660f
2.21.1
9b660f
9b660f
9b660f
From aa4938f261454f85c782e59e40d4e5a9e1a01dbc Mon Sep 17 00:00:00 2001
9b660f
From: Umang Jain <mailumangjain@gmail.com>
9b660f
Date: Wed, 18 Dec 2019 01:33:45 +0530
9b660f
Subject: [PATCH 2/7] js: Add caps-lock Warning to the dialogs
9b660f
9b660f
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/619
9b660f
---
9b660f
 js/gdm/authPrompt.js             | 4 ++++
9b660f
 js/ui/components/keyring.js      | 6 ++++++
9b660f
 js/ui/components/networkAgent.js | 8 ++++++++
9b660f
 js/ui/components/polkitAgent.js  | 2 ++
9b660f
 js/ui/shellMountOperation.js     | 3 +++
9b660f
 5 files changed, 23 insertions(+)
9b660f
9b660f
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
9b660f
index 71069e93b8..3ce9fd0d01 100644
9b660f
--- a/js/gdm/authPrompt.js
9b660f
+++ b/js/gdm/authPrompt.js
9b660f
@@ -113,6 +113,9 @@ var AuthPrompt = class {
9b660f
 
9b660f
         this._entry.grab_key_focus();
9b660f
 
9b660f
+        this._capsLockWarningLabel = new ShellEntry.CapsLockWarning();
9b660f
+        this.actor.add_child(this._capsLockWarningLabel);
9b660f
+
9b660f
         this._timedLoginIndicator = new St.Bin({ style_class: 'login-dialog-timed-login-indicator',
9b660f
                                                  scale_x: 0 });
9b660f
 
9b660f
@@ -432,6 +435,7 @@ var AuthPrompt = class {
9b660f
     setPasswordChar(passwordChar) {
9b660f
         this._entry.clutter_text.set_password_char(passwordChar);
9b660f
         this._entry.menu.isPassword = passwordChar != '';
9b660f
+        this._capsLockWarningLabel.visible = passwordChar !== '';
9b660f
     }
9b660f
 
9b660f
     setQuestion(question) {
9b660f
diff --git a/js/ui/components/keyring.js b/js/ui/components/keyring.js
9b660f
index 0d9f1e4663..3512fb63b1 100644
9b660f
--- a/js/ui/components/keyring.js
9b660f
+++ b/js/ui/components/keyring.js
9b660f
@@ -128,6 +128,12 @@ var KeyringDialog = class extends ModalDialog.ModalDialog {
9b660f
         this.prompt.set_password_actor(this._passwordEntry ? this._passwordEntry.clutter_text : null);
9b660f
         this.prompt.set_confirm_actor(this._confirmEntry ? this._confirmEntry.clutter_text : null);
9b660f
 
9b660f
+        if (this._passwordEntry || this._confirmEntry) {
9b660f
+            this._capsLockWarningLabel = new ShellEntry.CapsLockWarning();
9b660f
+            layout.attach(this._capsLockWarningLabel, 1, row, 1, 1);
9b660f
+            row++;
9b660f
+        }
9b660f
+
9b660f
         if (this.prompt.choice_visible) {
9b660f
             let choice = new CheckBox.CheckBox();
9b660f
             this.prompt.bind_property('choice-label', choice.getLabelActor(), 'text', GObject.BindingFlags.SYNC_CREATE);
9b660f
diff --git a/js/ui/components/networkAgent.js b/js/ui/components/networkAgent.js
9b660f
index f871c732d9..32d40fb2b9 100644
9b660f
--- a/js/ui/components/networkAgent.js
9b660f
+++ b/js/ui/components/networkAgent.js
9b660f
@@ -95,6 +95,14 @@ var NetworkSecretDialog = class extends ModalDialog.ModalDialog {
9b660f
                 secret.entry.clutter_text.set_password_char('\u25cf');
9b660f
         }
9b660f
 
9b660f
+        if (this._content.secrets.some(s => s.password)) {
9b660f
+            this._capsLockWarningLabel = new ShellEntry.CapsLockWarning();
9b660f
+            if (rtl)
9b660f
+                layout.attach(this._capsLockWarningLabel, 0, pos, 1, 1);
9b660f
+            else
9b660f
+                layout.attach(this._capsLockWarningLabel, 1, pos, 1, 1);
9b660f
+        }
9b660f
+
9b660f
         contentBox.messageBox.add(secretTable);
9b660f
 
9b660f
         if (flags & NM.SecretAgentGetSecretsFlags.WPS_PBC_ACTIVE) {
9b660f
diff --git a/js/ui/components/polkitAgent.js b/js/ui/components/polkitAgent.js
9b660f
index 21feb40903..734a217335 100644
9b660f
--- a/js/ui/components/polkitAgent.js
9b660f
+++ b/js/ui/components/polkitAgent.js
9b660f
@@ -108,6 +108,8 @@ var AuthenticationDialog = class extends ModalDialog.ModalDialog {
9b660f
 
9b660f
         this.setInitialKeyFocus(this._passwordEntry);
9b660f
         this._passwordBox.hide();
9b660f
+        this._capsLockWarningLabel = new ShellEntry.CapsLockWarning({ style_class: 'prompt-dialog-caps-lock-warning' });
9b660f
+        content.messageBox.add(this._capsLockWarningLabel);
9b660f
 
9b660f
         this._errorMessageLabel = new St.Label({ style_class: 'prompt-dialog-error-label' });
9b660f
         this._errorMessageLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
9b660f
diff --git a/js/ui/shellMountOperation.js b/js/ui/shellMountOperation.js
9b660f
index f976f400f4..3a2377ddaf 100644
9b660f
--- a/js/ui/shellMountOperation.js
9b660f
+++ b/js/ui/shellMountOperation.js
9b660f
@@ -305,6 +305,9 @@ var ShellMountPasswordDialog = class extends ModalDialog.ModalDialog {
9b660f
         this._passwordBox.add(this._passwordEntry, {expand: true });
9b660f
         this.setInitialKeyFocus(this._passwordEntry);
9b660f
 
9b660f
+        this._capsLockWarningLabel = new ShellEntry.CapsLockWarning();
9b660f
+        content.messageBox.add(this._capsLockWarningLabel);
9b660f
+
9b660f
         this._errorMessageLabel = new St.Label({ style_class: 'prompt-dialog-error-label',
9b660f
                                                  text: _("Sorry, that didn’t work. Please try again.") });
9b660f
         this._errorMessageLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
9b660f
-- 
9b660f
2.21.1
9b660f
9b660f
9b660f
From 016cbd971711665844d40ec678d2779c160f791b Mon Sep 17 00:00:00 2001
9b660f
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
9b660f
Date: Thu, 23 Jan 2020 22:37:06 +0100
9b660f
Subject: [PATCH 3/7] shellEntry: Make signal id variable private
9b660f
9b660f
Signal connection IDs should be private variables, so make this one
9b660f
private.
9b660f
9b660f
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/952
9b660f
---
9b660f
 js/ui/shellEntry.js | 10 +++++-----
9b660f
 1 file changed, 5 insertions(+), 5 deletions(-)
9b660f
9b660f
diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js
9b660f
index c1738c4064..cd7c9a6c88 100644
9b660f
--- a/js/ui/shellEntry.js
9b660f
+++ b/js/ui/shellEntry.js
9b660f
@@ -183,19 +183,19 @@ class CapsLockWarning extends St.Label {
9b660f
 
9b660f
         this.connect('notify::mapped', () => {
9b660f
             if (this.is_mapped()) {
9b660f
-                this.stateChangedId = this._keymap.connect('state-changed',
9b660f
+                this._stateChangedId = this._keymap.connect('state-changed',
9b660f
                     this._updateCapsLockWarningOpacity.bind(this));
9b660f
             } else {
9b660f
-                this._keymap.disconnect(this.stateChangedId);
9b660f
-                this.stateChangedId = 0;
9b660f
+                this._keymap.disconnect(this._stateChangedId);
9b660f
+                this._stateChangedId = 0;
9b660f
             }
9b660f
 
9b660f
             this._updateCapsLockWarningOpacity();
9b660f
         });
9b660f
 
9b660f
         this.connect('destroy', () => {
9b660f
-            if (this.stateChangedId > 0)
9b660f
-                this._keymap.disconnect(this.stateChangedId);
9b660f
+            if (this._stateChangedId > 0)
9b660f
+                this._keymap.disconnect(this._stateChangedId);
9b660f
         });
9b660f
 
9b660f
         this.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
9b660f
-- 
9b660f
2.21.1
9b660f
9b660f
9b660f
From ba65f9066d72731e345a5aced61f35d39c1c1376 Mon Sep 17 00:00:00 2001
9b660f
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
9b660f
Date: Thu, 23 Jan 2020 23:26:45 +0100
9b660f
Subject: [PATCH 4/7] theme: Move caps-lock warning to entry widget stylesheet
9b660f
9b660f
The caps-lock warning is more related to entries than dialogs and is
9b660f
also used in gdm, which is not realated to dialogs at all. Rename the
9b660f
css class to caps-lock-warning-label and move it to the entry
9b660f
stylesheet.
9b660f
9b660f
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/952
9b660f
---
9b660f
 data/theme/gnome-shell-sass/_common.scss | 12 +++++++-----
9b660f
 js/ui/shellEntry.js                      |  2 +-
9b660f
 2 files changed, 8 insertions(+), 6 deletions(-)
9b660f
9b660f
diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
9b660f
index 19a736ab7d..4661533de2 100644
9b660f
--- a/data/theme/gnome-shell-sass/_common.scss
9b660f
+++ b/data/theme/gnome-shell-sass/_common.scss
9b660f
@@ -94,6 +94,13 @@ StEntry {
9b660f
   }
9b660f
 }
9b660f
 
9b660f
+.caps-lock-warning-label {
9b660f
+  padding-left: 6.2em;
9b660f
+  @include fontsize($font-size - 1);
9b660f
+  color: $warning_color;
9b660f
+}
9b660f
+
9b660f
+
9b660f
 
9b660f
 /* Scrollbars */
9b660f
 
9b660f
@@ -391,11 +398,6 @@ StScrollBar {
9b660f
     padding-bottom: 8px;
9b660f
   }
9b660f
 
9b660f
-  .prompt-dialog-caps-lock-warning {
9b660f
-    @extend .prompt-dialog-error-label;
9b660f
-    padding-left: 6.2em;
9b660f
-  }
9b660f
-
9b660f
   .prompt-dialog-info-label {
9b660f
     font-size: 10pt;
9b660f
     padding-bottom: 8px;
9b660f
diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js
9b660f
index cd7c9a6c88..46eba88d54 100644
9b660f
--- a/js/ui/shellEntry.js
9b660f
+++ b/js/ui/shellEntry.js
9b660f
@@ -174,7 +174,7 @@ function addContextMenu(entry, params) {
9b660f
 var CapsLockWarning = GObject.registerClass(
9b660f
 class CapsLockWarning extends St.Label {
9b660f
     _init(params) {
9b660f
-        let defaultParams = { style_class: 'prompt-dialog-error-label' };
9b660f
+        let defaultParams = { style_class: 'caps-lock-warning-label' };
9b660f
         super._init(Object.assign(defaultParams, params));
9b660f
 
9b660f
         this.text = _('Caps lock is on.');
9b660f
-- 
9b660f
2.21.1
9b660f
9b660f
9b660f
From afd764c82febe21aec70bdfc19d256f3401530e1 Mon Sep 17 00:00:00 2001
9b660f
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
9b660f
Date: Thu, 23 Jan 2020 22:36:09 +0100
9b660f
Subject: [PATCH 5/7] shellEntry: Hide caps lock warning and use animation to
9b660f
 show it
9b660f
9b660f
Since the caps-lock warning adds a lot of spacing to dialogs and the
9b660f
lock screen, hide it by default and only show it when necessary. To make
9b660f
the transition smooth instead of just showing the label, animate it in
9b660f
using the height and opacity.
9b660f
9b660f
Also add some bottom padding to the label so we can show or hide that
9b660f
padding, too.
9b660f
9b660f
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/952
9b660f
---
9b660f
 data/theme/gnome-shell-sass/_common.scss |  1 +
9b660f
 js/ui/shellEntry.js                      | 33 ++++++++++++++++++------
9b660f
 2 files changed, 26 insertions(+), 8 deletions(-)
9b660f
9b660f
diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
9b660f
index 4661533de2..9e0751c8c5 100644
9b660f
--- a/data/theme/gnome-shell-sass/_common.scss
9b660f
+++ b/data/theme/gnome-shell-sass/_common.scss
9b660f
@@ -95,6 +95,7 @@ StEntry {
9b660f
 }
9b660f
 
9b660f
 .caps-lock-warning-label {
9b660f
+  padding-bottom: 8px;
9b660f
   padding-left: 6.2em;
9b660f
   @include fontsize($font-size - 1);
9b660f
   color: $warning_color;
9b660f
diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js
9b660f
index 46eba88d54..fc8ee37a9a 100644
9b660f
--- a/js/ui/shellEntry.js
9b660f
+++ b/js/ui/shellEntry.js
9b660f
@@ -6,6 +6,7 @@ const BoxPointer = imports.ui.boxpointer;
9b660f
 const Main = imports.ui.main;
9b660f
 const Params = imports.misc.params;
9b660f
 const PopupMenu = imports.ui.popupMenu;
9b660f
+const Tweener = imports.ui.tweener;
9b660f
 
9b660f
 var EntryMenu = class extends PopupMenu.PopupMenu {
9b660f
     constructor(entry) {
9b660f
@@ -179,31 +180,47 @@ class CapsLockWarning extends St.Label {
9b660f
 
9b660f
         this.text = _('Caps lock is on.');
9b660f
 
9b660f
+        this.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
9b660f
+        this.clutter_text.line_wrap = true;
9b660f
+
9b660f
         this._keymap = Clutter.get_default_backend().get_keymap();
9b660f
 
9b660f
         this.connect('notify::mapped', () => {
9b660f
             if (this.is_mapped()) {
9b660f
                 this._stateChangedId = this._keymap.connect('state-changed',
9b660f
-                    this._updateCapsLockWarningOpacity.bind(this));
9b660f
+                    () => this._sync(true));
9b660f
             } else {
9b660f
                 this._keymap.disconnect(this._stateChangedId);
9b660f
                 this._stateChangedId = 0;
9b660f
             }
9b660f
 
9b660f
-            this._updateCapsLockWarningOpacity();
9b660f
+            this._sync(false);
9b660f
         });
9b660f
 
9b660f
         this.connect('destroy', () => {
9b660f
-            if (this._stateChangedId > 0)
9b660f
+            if (this._stateChangedId)
9b660f
                 this._keymap.disconnect(this._stateChangedId);
9b660f
         });
9b660f
-
9b660f
-        this.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
9b660f
-        this.clutter_text.line_wrap = true;
9b660f
     }
9b660f
 
9b660f
-    _updateCapsLockWarningOpacity() {
9b660f
+    _sync(animate) {
9b660f
         let capsLockOn = this._keymap.get_caps_lock_state();
9b660f
-        this.opacity = capsLockOn ? 255 : 0;
9b660f
+
9b660f
+        Tweener.removeTweens(this);
9b660f
+
9b660f
+        this.natural_height_set = false;
9b660f
+        let [, height] = this.get_preferred_height(-1);
9b660f
+        this.natural_height_set = true;
9b660f
+
9b660f
+        Tweener.addTween(this, {
9b660f
+            height: capsLockOn ? height : 0,
9b660f
+            opacity: capsLockOn ? 255 : 0,
9b660f
+            time: animate ? 0.2 : 0,
9b660f
+            transition: 'easeOutQuad',
9b660f
+            onComplete: () => {
9b660f
+                if (capsLockOn)
9b660f
+                    this.height = -1;
9b660f
+            },
9b660f
+        });
9b660f
     }
9b660f
 });
9b660f
-- 
9b660f
2.21.1
9b660f
9b660f
9b660f
From 1ef3dafb51da380c54635d0565dc098e40bbb3e1 Mon Sep 17 00:00:00 2001
9b660f
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
9b660f
Date: Wed, 29 Jan 2020 17:48:57 +0100
9b660f
Subject: [PATCH 6/7] js: Initialize some properties
9b660f
9b660f
Otherwise those can result in the (harmless) "reference to undefined
9b660f
property" warnings.
9b660f
9b660f
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/970
9b660f
---
9b660f
 js/ui/overview.js   | 1 +
9b660f
 js/ui/shellEntry.js | 1 +
9b660f
 2 files changed, 2 insertions(+)
9b660f
9b660f
diff --git a/js/ui/overview.js b/js/ui/overview.js
9b660f
index dc6ad1821b..5bad4cbd62 100644
9b660f
--- a/js/ui/overview.js
9b660f
+++ b/js/ui/overview.js
9b660f
@@ -80,6 +80,7 @@ var Overview = class {
9b660f
     constructor() {
9b660f
         this._overviewCreated = false;
9b660f
         this._initCalled = false;
9b660f
+        this._visible = false;
9b660f
 
9b660f
         Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
9b660f
         this._sessionUpdated();
9b660f
diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js
9b660f
index fc8ee37a9a..55267e7c87 100644
9b660f
--- a/js/ui/shellEntry.js
9b660f
+++ b/js/ui/shellEntry.js
9b660f
@@ -184,6 +184,7 @@ class CapsLockWarning extends St.Label {
9b660f
         this.clutter_text.line_wrap = true;
9b660f
 
9b660f
         this._keymap = Clutter.get_default_backend().get_keymap();
9b660f
+        this._stateChangedId = 0;
9b660f
 
9b660f
         this.connect('notify::mapped', () => {
9b660f
             if (this.is_mapped()) {
9b660f
-- 
9b660f
2.21.1
9b660f
9b660f
9b660f
From 273f7adb43cfee907342d017e1454ea90d42d262 Mon Sep 17 00:00:00 2001
9b660f
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
9b660f
Date: Fri, 21 Feb 2020 19:38:53 +0100
9b660f
Subject: [PATCH 7/7] shellEntry: Restore natural-height-set instead of forcing
9b660f
 it
9b660f
9b660f
If we are transitioning the label from 0 to its natural height, we
9b660f
must set natural-height-set again after querying the preferred height,
9b660f
otherwise Clutter would skip the transition.
9b660f
9b660f
However when transitioning in the opposite direction, setting the
9b660f
property to true can go horribly wrong:
9b660f
If the actor hasn't been allocated before, it will store a fixed
9b660f
natural height of 0. But as there is no fixed min-height, we can
9b660f
end up with min-height > natural-height, which is a fatal error.
9b660f
9b660f
(This isn't an issue when *actually* setting a fixed height, as
9b660f
that will set both natural and minimum height)
9b660f
9b660f
So instead of always setting natural-height-set to true, restore
9b660f
its previous value to fix the issue.
9b660f
9b660f
https://gitlab.gnome.org/GNOME/gnome-shell/issues/2255
9b660f
---
9b660f
 js/ui/shellEntry.js | 3 ++-
9b660f
 1 file changed, 2 insertions(+), 1 deletion(-)
9b660f
9b660f
diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js
9b660f
index 55267e7c87..4a30b22f7a 100644
9b660f
--- a/js/ui/shellEntry.js
9b660f
+++ b/js/ui/shellEntry.js
9b660f
@@ -209,9 +209,10 @@ class CapsLockWarning extends St.Label {
9b660f
 
9b660f
         Tweener.removeTweens(this);
9b660f
 
9b660f
+        const naturalHeightSet = this.natural_height_set;
9b660f
         this.natural_height_set = false;
9b660f
         let [, height] = this.get_preferred_height(-1);
9b660f
-        this.natural_height_set = true;
9b660f
+        this.natural_height_set = naturalHeightSet;
9b660f
 
9b660f
         Tweener.addTween(this, {
9b660f
             height: capsLockOn ? height : 0,
9b660f
-- 
9b660f
2.21.1
9b660f