fix(fillbar): l'info-bulle ne fait plus clignoter la barrette en boucle

La remontee automatique voyait l'info-bulle d'un bouton - posee par-dessus la
barrette - comme un recouvrement : NOTOPMOST puis TOPMOST, la barrette
disparaissait un instant, l'info-bulle se fermait puis se rouvrait sous la
souris immobile. Les fenetres de notre propre processus ne comptent plus.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
r-zakarya
2026-09-28 18:25:25 +01:00
parent 28349c10c8
commit e786d8fe14
+9 -1
View File
@@ -1214,6 +1214,7 @@ var
LRect: TRect; LRect: TRect;
LPt: TPoint; LPt: TPoint;
LHit: HWND; LHit: HWND;
LPid: DWORD;
begin begin
Result := False; Result := False;
if not GetWindowRect(AWnd, LRect) then Exit; if not GetWindowRect(AWnd, LRect) then Exit;
@@ -1221,7 +1222,14 @@ begin
LPt.Y := (LRect.Top + LRect.Bottom) div 2; LPt.Y := (LRect.Top + LRect.Bottom) div 2;
LHit := WindowFromPoint(LPt); LHit := WindowFromPoint(LPt);
if LHit = 0 then Exit; if LHit = 0 then Exit;
Result := (LHit <> AWnd) and (GetAncestor(LHit, GA_ROOT) <> AWnd); if (LHit = AWnd) or (GetAncestor(LHit, GA_ROOT) = AWnd) then Exit;
// NOS PROPRES FENETRES NE RECOUVRENT PAS. L'info-bulle d'un bouton s'affiche
// PAR-DESSUS la barrette : la compter comme un recouvrement faisait
// repasser la barrette devant (NOTOPMOST puis TOPMOST - elle disparaissait
// un instant), ce qui fermait l'info-bulle, qui se rouvrait sous la souris
// immobile... en boucle.
GetWindowThreadProcessId(LHit, @LPid);
Result := LPid <> GetCurrentProcessId;
end; end;
procedure LazyForceToTop(AWnd: HWND); procedure LazyForceToTop(AWnd: HWND);