fix #9: floating point exception when minimizing all windows in grid layout