From 0605a1900111022335e507397df80d883645781b Mon Sep 17 00:00:00 2001 From: Nestor Lobo Date: Fri, 31 Jul 2026 19:27:02 -0300 Subject: [PATCH] Add fingerprint authentication support via AuthPrompt signals Listen to the lock dialog's AuthPrompt 'next' signal to detect when fingerprint verification is active (e.g. 'Place your finger' message), triggering the same blur/pause effects as the password prompt. Also hooks into _onVerificationComplete to apply prompt effects during successful fingerprint unlock transitions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- extension.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/extension.js b/extension.js index 18884ab..a01493b 100644 --- a/extension.js +++ b/extension.js @@ -175,6 +175,8 @@ export default class LockscreenExtension extends Extension { }; } ); + + this._connectFingerprintAuth(dialog); // Removing the existing signal to use our custom one const swipeSignalId = GObject.signal_lookup('end', gtype); @@ -210,6 +212,35 @@ export default class LockscreenExtension extends Extension { dialog._updateBackgrounds(); } + _connectFingerprintAuth(dialog) { + const authPrompt = dialog._authPrompt; + if (!authPrompt) { + warn('AuthPrompt not available, fingerprint detection skipped'); + return; + } + + // When a fingerprint verification message is shown (e.g. "Place your finger") + // treat it as a prompt being shown so blur/pause effects apply + authPrompt.connectObject( + 'next', () => { + this._onPromptShow(); + }, + this + ); + + // Override _onVerificationComplete to detect successful fingerprint unlock + this._injectionManager.overrideMethod( + dialog, '_onVerificationComplete', + (original) => { + const self = this; + return function(...args) { + self._onPromptShow(); + original.call(this, ...args); + }; + } + ); + } + _injectCreateBackground() { this._injectionManager.overrideMethod( Main.screenShield._dialog, '_createBackground', @@ -430,6 +461,7 @@ export default class LockscreenExtension extends Extension { this._injectAttempts = 0; Main.screenShield._dialog._swipeTracker?.disconnectObject(this); + Main.screenShield._dialog._authPrompt?.disconnectObject(this); this._tapAction?.disconnectObject(this); // Return all window actors to window_group before destroying