fix(totp): pas de notification 'toujours dans le tray' pendant le scan du QR
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -217,7 +217,7 @@ type
|
|||||||
// it before we came out of the tray. False for callers that already decided
|
// it before we came out of the tray. False for callers that already decided
|
||||||
// who should be focused (post-autofill hands it to the filled window).
|
// who should be focused (post-autofill hands it to the filled window).
|
||||||
procedure MinimizeToTray(AClearClipboard: Boolean = True;
|
procedure MinimizeToTray(AClearClipboard: Boolean = True;
|
||||||
AReturnForeground: Boolean = True);
|
AReturnForeground: Boolean = True; ANotify: Boolean = True);
|
||||||
// Record the application currently in the foreground as the one to restore
|
// Record the application currently in the foreground as the one to restore
|
||||||
// focus to when we go back to the tray. Ignores our own and shell windows.
|
// focus to when we go back to the tray. Ignores our own and shell windows.
|
||||||
procedure CaptureForegroundOwner;
|
procedure CaptureForegroundOwner;
|
||||||
@@ -835,7 +835,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPMBridge.MinimizeToTray(AClearClipboard: Boolean = True;
|
procedure TPMBridge.MinimizeToTray(AClearClipboard: Boolean = True;
|
||||||
AReturnForeground: Boolean = True);
|
AReturnForeground: Boolean = True; ANotify: Boolean = True);
|
||||||
var
|
var
|
||||||
LFormHwnd, LAppHwnd: HWND;
|
LFormHwnd, LAppHwnd: HWND;
|
||||||
begin
|
begin
|
||||||
@@ -893,7 +893,9 @@ begin
|
|||||||
// 3. First-time only: pop a balloon notification so the user knows the
|
// 3. First-time only: pop a balloon notification so the user knows the
|
||||||
// app is still running in the tray (and didn't crash). Skipped when
|
// app is still running in the tray (and didn't crash). Skipped when
|
||||||
// the user opted out via Settings.
|
// the user opted out via Settings.
|
||||||
if (not FBalloonShown) and FShowNotifications then
|
// ANotify=False : absence de quelques centaines de ms (scan du QR), la
|
||||||
|
// fenetre revient seule - l'annonce "toujours dans le tray" serait fausse.
|
||||||
|
if ANotify and (not FBalloonShown) and FShowNotifications then
|
||||||
begin
|
begin
|
||||||
ShowFirstTimeBalloon;
|
ShowFirstTimeBalloon;
|
||||||
FBalloonShown := True;
|
FBalloonShown := True;
|
||||||
|
|||||||
@@ -1399,7 +1399,7 @@ begin
|
|||||||
else if ACmd = 'qr/screen' then
|
else if ACmd = 'qr/screen' then
|
||||||
begin
|
begin
|
||||||
LogLine('qr/screen: scanning');
|
LogLine('qr/screen: scanning');
|
||||||
FBridge.MinimizeToTray(False, False);
|
FBridge.MinimizeToTray(False, False, False);
|
||||||
TThread.CreateAnonymousThread(
|
TThread.CreateAnonymousThread(
|
||||||
procedure
|
procedure
|
||||||
var
|
var
|
||||||
|
|||||||
Reference in New Issue
Block a user