Merge changes Ia9df12fa,Ib114e8cb into pi-dev

* changes:
  Avoid calling detachChildren from onAppVisibilityChanged
  Fix computation of child window insets.