Initialize and save maximimized status of widget correctly.