def METHOD_NAME(self, widget, dimensions):
    self.width = dimensions.width
    self.height = dimensions.height
    if self.bot_size is not None:
        publish_event(REDRAW_EVENT, data=(self.width, self.height))