Skip to content

Commit

Permalink
Clarified reasoning comment regarding state checks being performed at…
Browse files Browse the repository at this point in the history
… the backends
  • Loading branch information
proneon267 committed Sep 27, 2024
1 parent 8b56d66 commit 7cd1489
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/toga/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,10 @@ def state(self, state: WindowState) -> None:
f"A non-resizable window cannot be set to a state of {state}."
)
else:
# State checks are handled by the backend (e.g., Cocoa) to
# accommodate non-blocking OS calls. Performing these checks
# at the core level could result in incorrect inferences, as
# non-blocking OS calls may not have completed at the time
# State checks are handled by the backend to accommodate for
# non-blocking native OS calls(e.g., Cocoa). Performing these
# checks at the core level could result in incorrect inferences,
# as non-blocking OS calls may not have completed at the time
# the core checks the current state. This could lead to incorrect
# assertions and potential glitches.
self._impl.set_window_state(state)
Expand Down

0 comments on commit 7cd1489

Please sign in to comment.