set canvas size accorting to initial window size