Restore removal of the clear progress timer on window destruction

5c4f6b39b removed the timer in Window.destroy() so that it cannot call
back into a destroyed window, but 100c78bbb dropped those lines again,
presumably by accident. Closing a window whose program had reported
progress via OSC 9;4 then leaves the timer running, and once the
progress goes stale clear_progress_if_needed() raises:

    AttributeError: 'Window' object has no attribute 'screen'
This commit is contained in:
desvaters 2026-10-19 16:52:46 +02:00
parent 29c80b42f1
commit 6a7b01eed9
No known key found for this signature in database

View file

@ -2179,6 +2179,9 @@ class Window:
def destroy(self) -> None:
self.call_watchers(self.watchers.on_close, {})
self.destroyed = True
if self.clear_progress_timer:
remove_timer(self.clear_progress_timer)
self.clear_progress_timer = 0
self.clipboard_request_manager.close()
del self.kitten_result_processors
if hasattr(self, 'screen'):