mirror of
https://github.com/kuhyx/screen-locker.git
synced 2026-11-17 21:44:59 +01:00
The lock now paints one container per live output instead of one window on the primary, and claims the screen through an Arbiter at RANK_SCREEN_LOCKER so the wake alarm can outrank it. The fan-out happens at the widget factory, not the render loop. Painting a screen here is not a pure function -- the ~20 clear_container() flows record workouts, credit weeks and branch on state while they paint -- so re-running a flow per surface would double those side effects. Instead `_label`, `_button_row` and friends build N copies and return a group that mirrors later configure calls to all of them, and a flow body still runs once. Frame groups nest, so `_button(button_row, ...)` reads exactly as it did. The degenerate case carries as much weight as the general one: the status window, the post-sick-day verify window and the relaxed-day prompt have no lock and no surfaces, and share this same factory. They get a group of exactly one frame and behave as they always did. Text boxes are the one thing that cannot be shared. Entries fan out over a single StringVar, but tk.Text has no such variable, so the sick-day description genuinely diverges per monitor; TextGroup.get() returns whichever copy was actually typed into, preserving "answer on any monitor". Tests: the suite hung rather than failed on first run, which is the trap gatelock's own conftest documents -- screen_locker patches its own `tk`, but LockWindow builds Toplevels through gatelock's, and real tkinter over a MagicMock root recurses without bound. `_gatelock_fixtures` closes that and redirects the runtime dir so no test can stand a production locker down. Every other test runs single-output, where fan-out is unobservable, so test_surface_fanout runs on two outputs; each assertion was checked by cropping the group loops to the primary and confirming it goes red. 874 tests, 100% branch coverage, pre-commit clean, no lint suppressions. |
||
|---|---|---|
| .. | ||
| tests | ||
| __init__.py | ||
| _auto_upgrade.py | ||
| _compliance_state.py | ||
| _constants.py | ||
| _early_bird.py | ||
| _extra_benefits.py | ||
| _heat_skip.py | ||
| _log_io.py | ||
| _log_mixin.py | ||
| _manual_push.py | ||
| _manual_sync.py | ||
| _manual_workout_dialog.py | ||
| _manual_workout_widgets.py | ||
| _manual_workout.py | ||
| _mcp.py | ||
| _phone_verification.py | ||
| _runnerup_db.py | ||
| _runnerup_verification.py | ||
| _shutdown_base.py | ||
| _shutdown.py | ||
| _sick_dialog.py | ||
| _sick_tracker.py | ||
| _status_data.py | ||
| _status_view_verify.py | ||
| _status.py | ||
| _surface_group.py | ||
| _sync_retry.py | ||
| _temperature_status_mixin.py | ||
| _temperature.py | ||
| _time_check.py | ||
| _ui_flows_relaxed.py | ||
| _ui_flows.py | ||
| _ui_widgets.py | ||
| _wake_state.py | ||
| _weekly_check.py | ||
| _window_setup.py | ||
| _workout_credit.py | ||
| _workout_sync.py | ||
| adjust_shutdown_schedule.sh | ||
| screen_lock.py | ||
| status_view.py | ||