Added resizing code from FRB to handle window maximizing/rescaling.