diff --git a/lcl/include/application.inc b/lcl/include/application.inc index 557d144acf..f188e1a37a 100644 --- a/lcl/include/application.inc +++ b/lcl/include/application.inc @@ -919,7 +919,10 @@ procedure TApplication.UpdateVisible; for i := 0 to Screen.FormCount - 1 do begin AForm := Screen.Forms[i]; - if AForm.Visible and (AForm.Parent = nil) and UseAppTaskbarItem(AForm) then + if (AForm.Parent = nil) + and AForm.Showing // check showing (not Visible) + and (not (csDestroyingHandle in AForm.ControlState)) + and UseAppTaskbarItem(AForm) then begin Result := True; break;