And I feel we should remove the windowState.equals(WindowState.MAXMIZED), because the windowState value is always maxmized weather or not it is selected.