def METHOD_NAME(self, window_properties):
    # specify width to truncate title with ellipsis
    title = window_properties.get("title", "")
    if title:
        if self.parent.max_width and len(title) > self.parent.max_width:
            window_properties["title"] = title[: self.parent.max_width - 1] + "…"
    else:
        window_properties["title"] = ""
    return window_properties