One idea would be to create one panel callback for all the child panels which swallows the EVENT_LOST_FOCUS (i.e. return 1) so it doesn't reach the parent callback.
On the other hand you could use the "panel" variable of the callback which is identifying the panel which received the "event" and act as required.
I hope I could help.
-----------------------
/* Nothing past this point should fail if the code is working as intended */