fix frameless window close if sub window opened