diff --git a/0001-unlockDialog-Don-t-create-AuthDialog-just-to-finish-.patch b/0001-unlockDialog-Don-t-create-AuthDialog-just-to-finish-.patch new file mode 100644 index 0000000..9f243cf --- /dev/null +++ b/0001-unlockDialog-Don-t-create-AuthDialog-just-to-finish-.patch @@ -0,0 +1,88 @@ +From 7a96d259209297b4fad57352abae0a45e7b192fc Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Fri, 8 Oct 2021 11:08:17 -0400 +Subject: [PATCH 1/2] unlockDialog: Don't create AuthDialog just to finish it + +If the the unlock dialog gets finished before an auth dialog is +created, the code currently creates one just to tell it to finish. + +This commit changes the code to skip creating the auth dialog in +that case. +--- + js/ui/unlockDialog.js | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js +index 370385abc..f4c76c41a 100644 +--- a/js/ui/unlockDialog.js ++++ b/js/ui/unlockDialog.js +@@ -845,61 +845,65 @@ var UnlockDialog = GObject.registerClass({ + } + + if (this._gdmClient) { + this._gdmClient = null; + delete this._gdmClient; + } + + if (this._userLoadedId) { + this._user.disconnect(this._userLoadedId); + this._userLoadedId = 0; + } + + if (this._userSwitchEnabledId) { + this._screenSaverSettings.disconnect(this._userSwitchEnabledId); + this._userSwitchEnabledId = 0; + } + } + + _updateUserSwitchVisibility() { + this._otherUserButton.visible = this._userManager.can_switch() && + this._screenSaverSettings.get_boolean('user-switch-enabled') && + !this._lockdownSettings.get_boolean('disable-user-switching'); + } + + cancel() { + if (this._authPrompt) + this._authPrompt.cancel(); + } + + finish(onComplete) { +- this._ensureAuthPrompt(); ++ if (!this._authPrompt) { ++ onComplete(); ++ return; ++ } ++ + this._authPrompt.finish(onComplete); + } + + open(timestamp) { + this.show(); + + if (this._isModal) + return true; + + let modalParams = { + timestamp, + actionMode: Shell.ActionMode.UNLOCK_SCREEN, + }; + if (!Main.pushModal(this, modalParams)) + return false; + + this._isModal = true; + + return true; + } + + activate() { + this._showPrompt(); + } + + popModal(timestamp) { + if (this._isModal) { + Main.popModal(this, timestamp); + this._isModal = false; + } +-- +2.31.1 + diff --git a/0002-unlockDialog-Properly-reset-auth-prompt-when-showing.patch b/0002-unlockDialog-Properly-reset-auth-prompt-when-showing.patch new file mode 100644 index 0000000..6222aeb --- /dev/null +++ b/0002-unlockDialog-Properly-reset-auth-prompt-when-showing.patch @@ -0,0 +1,114 @@ +From e45d8817b4fc5fed35d3b39612f7993351b7c92c Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Tue, 5 Oct 2021 11:01:19 -0400 +Subject: [PATCH 2/2] unlockDialog: Properly reset auth prompt when showing it + +If a user hits escape twice really fast when coming back to +their machine to unlock it, they made end up getting presented +with a non-functional unlock screen that doesn't show their +user icon and doesn't ask for a password. + +This is because showPrompt assumes that if an auth prompt already +exists, it's ready to go. That may not be true, if it's in the +process of getting torn down at the time because it's in the middle +of a cancel animation. + +This commit solves the problem by ensuring the auth prompt is always +in a fresh reset state before showing it. +--- + js/ui/unlockDialog.js | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js +index f4c76c41a..3e80c002a 100644 +--- a/js/ui/unlockDialog.js ++++ b/js/ui/unlockDialog.js +@@ -649,73 +649,73 @@ var UnlockDialog = GObject.registerClass({ + } + + _updateBackgroundEffects() { + const themeContext = St.ThemeContext.get_for_stage(global.stage); + + for (const widget of this._backgroundGroup) { + const effect = widget.get_effect('blur'); + + if (effect) { + effect.set({ + brightness: BLUR_BRIGHTNESS, + sigma: BLUR_SIGMA * themeContext.scale_factor, + }); + } + } + } + + _updateBackgrounds() { + for (let i = 0; i < this._bgManagers.length; i++) + this._bgManagers[i].destroy(); + + this._bgManagers = []; + this._backgroundGroup.destroy_all_children(); + + for (let i = 0; i < Main.layoutManager.monitors.length; i++) + this._createBackground(i); + this._updateBackgroundEffects(); + } + + _ensureAuthPrompt() { +- if (this._authPrompt) +- return; +- +- this._authPrompt = new AuthPrompt.AuthPrompt(this._gdmClient, +- AuthPrompt.AuthPromptMode.UNLOCK_ONLY); +- this._authPrompt.connect('failed', this._fail.bind(this)); +- this._authPrompt.connect('cancelled', this._fail.bind(this)); +- this._authPrompt.connect('reset', this._onReset.bind(this)); +- +- this._promptBox.add_child(this._authPrompt); ++ if (!this._authPrompt) { ++ this._authPrompt = new AuthPrompt.AuthPrompt(this._gdmClient, ++ AuthPrompt.AuthPromptMode.UNLOCK_ONLY); ++ this._authPrompt.connect('failed', this._fail.bind(this)); ++ this._authPrompt.connect('cancelled', this._fail.bind(this)); ++ this._authPrompt.connect('reset', this._onReset.bind(this)); ++ this._promptBox.add_child(this._authPrompt); ++ } + +- this._authPrompt.reset(); +- this._authPrompt.updateSensitivity(true); ++ if (this._authPrompt.verificationStatus !== AuthPromptStatus.NOT_VERIFYING) { ++ this._authPrompt.reset(); ++ this._authPrompt.updateSensitivity(true); ++ } + } + + _maybeDestroyAuthPrompt() { + let focus = global.stage.key_focus; + if (focus === null || + (this._authPrompt && this._authPrompt.contains(focus)) || + (this._otherUserButton && focus === this._otherUserButton)) + this.grab_key_focus(); + + if (this._authPrompt) { + this._authPrompt.destroy(); + this._authPrompt = null; + } + } + + _showClock() { + if (this._activePage === this._clock) + return; + + this._activePage = this._clock; + + this._adjustment.ease(0, { + duration: CROSSFADE_TIME, + mode: Clutter.AnimationMode.EASE_OUT_QUAD, + onComplete: () => this._maybeDestroyAuthPrompt(), + }); + } + + _showPrompt() { + this._ensureAuthPrompt(); +-- +2.31.1 + diff --git a/gnome-shell.spec b/gnome-shell.spec index f3b0969..1277164 100644 --- a/gnome-shell.spec +++ b/gnome-shell.spec @@ -2,7 +2,7 @@ Name: gnome-shell Version: 41.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Window management and application launching for GNOME License: GPLv2+ @@ -28,6 +28,10 @@ Patch40001: 0001-gdm-Work-around-failing-fingerprint-auth.patch # Fix crash if settings get updated after an entry is destroyed (#2009637) Patch50001: 0001-st-password-entry-Fix-crash-when-DConf-changes-after.patch +# Fix problem where lock screen gets confused if you hit escape too fast too many times +# when coming back from screen blank +Patch60001: 0001-unlockDialog-Don-t-create-AuthDialog-just-to-finish-.patch +Patch60002: 0002-unlockDialog-Properly-reset-auth-prompt-when-showing.patch %define eds_version 3.33.1 %define gnome_desktop_version 3.35.91 @@ -242,6 +246,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/evolution-calendar.de %{_mandir}/man1/gnome-shell.1* %changelog +* Tue Oct 26 2021 Ray Strode - 41.0-5 +- Fix unlock screen confusion when hitting escape too much + * Tue Oct 12 2021 Ray Strode - 41.0-4 - Fix StPasswordEntry crash Resolves: #2009637