I agree with Richard and Angela, but I think they're using "when" in a different way than I was. In their examples, the verb following the "when" isn't continuous/progressive, it's past tense (which is then followed by a continuous verb). So the example "When I woke up the sun was shining" isn't talking about when the sun was shining, it's talking about when I woke up. To use the past continuous, it would need to be, "When I was waking up, the sun was shining," which isn't correct. In their examples, "when" is used to established a sequence of events (first this happened, then that happened; or, when this happened, that was happening at the same time). If the two events are simultaneous, we use "while" or "as."