From 4f427f4e0dbfe721f883c7eb8670957659782abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 18 Mar 2020 22:20:33 +0100 Subject: [PATCH] js: Do not set entries' ClutterText:editable property The property influences the text's (and thus entry's) minimum width[0], which is generally not what we want. And as we now prevent text from being entered in non-reactive entries by other means, we can simply drop it. [0] https://gitlab.gnome.org/GNOME/mutter/-/blob/master/clutter/clutter/clutter-text.c#L2940 https://gitlab.gnome.org/GNOME/gnome-shell/issues/2423 --- js/gdm/authPrompt.js | 1 - js/ui/appDisplay.js | 1 - js/ui/components/keyring.js | 8 ++------ js/ui/shellMountOperation.js | 4 ---- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js index a9623f570..3434de0cf 100644 --- a/js/gdm/authPrompt.js +++ b/js/gdm/authPrompt.js @@ -425,7 +425,6 @@ var AuthPrompt = GObject.registerClass({ updateSensitivity(sensitive) { this._entry.reactive = sensitive; - this._entry.clutter_text.editable = sensitive; } vfunc_hide() { diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index a8c0cb3c2..4f3d88df5 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -691,7 +691,6 @@ var AllView = GObject.registerClass({ // Toggle search entry Main.overview.searchEntry.reactive = !isOpen; - Main.overview.searchEntry.clutter_text.editable = !isOpen; this._displayingPopup = isOpen; }); diff --git a/js/ui/components/keyring.js b/js/ui/components/keyring.js index c0191fbba..8623f2fdd 100644 --- a/js/ui/components/keyring.js +++ b/js/ui/components/keyring.js @@ -111,15 +111,11 @@ class KeyringDialog extends ModalDialog.ModalDialog { } _updateSensitivity(sensitive) { - if (this._passwordEntry) { + if (this._passwordEntry) this._passwordEntry.reactive = sensitive; - this._passwordEntry.clutter_text.editable = sensitive; - } - if (this._confirmEntry) { + if (this._confirmEntry) this._confirmEntry.reactive = sensitive; - this._confirmEntry.clutter_text.editable = sensitive; - } this._continueButton.can_focus = sensitive; this._continueButton.reactive = sensitive; diff --git a/js/ui/shellMountOperation.js b/js/ui/shellMountOperation.js index e17b0bc17..dc620a09d 100644 --- a/js/ui/shellMountOperation.js +++ b/js/ui/shellMountOperation.js @@ -447,12 +447,8 @@ var ShellMountPasswordDialog = GObject.registerClass({ let useKeyfiles = this._keyfilesCheckbox.checked; this._passwordEntry.reactive = !useKeyfiles; this._passwordEntry.can_focus = !useKeyfiles; - this._passwordEntry.clutter_text.editable = !useKeyfiles; - this._passwordEntry.clutter_text.selectable = !useKeyfiles; this._pimEntry.reactive = !useKeyfiles; this._pimEntry.can_focus = !useKeyfiles; - this._pimEntry.clutter_text.editable = !useKeyfiles; - this._pimEntry.clutter_text.selectable = !useKeyfiles; this._rememberChoice.reactive = !useKeyfiles; this._rememberChoice.can_focus = !useKeyfiles; this._keyfilesLabel.visible = useKeyfiles;