Finally figured out how to pass variable window dimensions from gtk to cairo