"I did my homework when I had watched tv." ??

I came across to this sentence in a grammar test and I'm confused?
I'm not quite sure what you meant to say, but this sentence is not correct anyway. "I was doing my homework while (I was) watching tv" may be the correct sentence if you intended to say that those two actions were happening simultaneously.
Two sequential actions have taken place: first I watched tv; then I did my homework.

The sentence is grammatically correct.
Students: We have free audio pronunciation exercises.
Oooops! Emotion: embarrassed
It is not clear yet for me.
AnonymousIt is not clear yet for me.
Well, how about:

After I had watched television, I did my homework.
Teachers: We supply a list of EFL job vacancies
is "when" used that way?

I see now...thank you