Resize window when geometry changes

Setting geometry now resizes the surface.

Change-Id: I89a1a8409a3365d40745c18bbecf0cd8bf373a35