removing xbutton and shadow when it is not showing