the window can only be null if the activity is not visible. Are you sending "MSG_GETSIZE" anywhere in Lanica platform? This is only being used in getSize() of a view, so in our case the activity should be visible.