Thanks, Gillnetter. That's a very useful answer.
Right before I read your reply, I'd thought the only way to express the meaning as you understood it is to use the following sentence: While we were having lunch, we were playing basketball. At least that's what I've learnt from grammar books.
Could anyone cast further light on this matter, please?
Student or Learner