When所引导的时间状语从句,主句和从句各用什么时态?

问题描述:

When所引导的时间状语从句,主句和从句各用什么时态?
例题:We( )our breakfast when an old man came to the door.
A.just have had
B.have just had
C.just had
D.had just had
请问这题该选什么答案?并说明理由!

D
when引导的从句发生在过去,且“我们刚吃完早饭”,故主句应使用过去完成时态