Only expose window when going in and out of frameless; otherwise QML tests can hang

Change-Id: Ib5d891f9a430a5a8cf7d870c4e9e0d12b05934cd