Actually, there are 3 conditions to change the panel:
* we're in the composer
* we don't send a SMS to several recipients (as in this case we go to the thread list)
* the window that sent the message is the same than the window that receives the "sending" event

What you're saying would work for the first 2 conditions, but not the last one. Here is how it wouldn't work:
* open the Messages app
* press the "new sms" button
* press "home"
* launch the Contacts app
* open a contact
* press the "send sms" button
* send the message
* press home
* launch Messages again (should launch the first instance)
=> we should still be in the composer

if we merely check if the view is in the composer view in "onMessageSending", this would fail.