macOS: Fix progress bar on dock icon doubling speed with every indeterminate progress state without an intervening clear

Fixes #9114
This commit is contained in:
Kovid Goyal
2025-10-14 22:28:31 +05:30
parent 016bbef0b0
commit 7c237dcb02
3 changed files with 7 additions and 3 deletions

View File

@@ -166,6 +166,8 @@ Detailed list of changes
- macOS: Handle dropping of file promises into kitty in addition to file paths (:pull:`9084`)
- macOS: Fix indeterminate progress bar displayed on dock icon increasing speed when indeterminate progress is set without being cleared first (:iss:`9114`)
0.43.1 [2025-10-01]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -1315,8 +1315,10 @@ cocoa_show_progress_bar_on_dock_icon(PyObject *self UNUSED, PyObject *args) {
[dock_pbar setFraction:percent/100.];
[dock_pbar setIndeterminate:NO];
} else if (percent > 100) {
[dock_pbar setIndeterminate:YES];
tick_dock_pbar();
if (![dock_pbar isIndeterminate]) {
[dock_pbar setIndeterminate:YES];
tick_dock_pbar();
}
}
[dock_pbar setFrameSize:NSMakeSize(dockTile.size.width - 20, 20)];
[dock_pbar setFrameOrigin:NSMakePoint(10, -2)];

View File

@@ -691,10 +691,10 @@ class Window:
self.last_focused_at = 0.
self.is_focused: bool = False
self.progress = Progress()
self.clear_progress_timer: int = 0
self.last_resized_at = 0.
self.started_at = monotonic()
self.created_at = time_ns()
self.clear_progress_timer: int = 0
self.current_remote_data: list[str] = []
self.current_mouse_event_button = 0
self.current_clipboard_read_ask: bool | None = None