dosforge 0.9.51
dosforge 0.9.51 — Windows GUI: Combobox wheel + focus polish
Quality-of-life fix for the Windows GUI (Linux GUI benefits too).
What's fixed
In the New Disk view, ttk.Combobox dropdowns no longer behave
weirdly on Windows:
- Wheel-over-dropdown now scrolls the page. Previously, rolling the
mouse wheel over (or past) any dropdown — DOS Version, Disk Format,
BIOS preset, etc. — would either cycle the dropdown's value or "get
stuck" inside it instead of scrolling the form. Tk's default
<MouseWheel>class binding onTComboboxis now removed, so
the page-level scroll handler always wins. - Clicking outside a dropdown releases focus. Previously, after
picking a value from (e.g.) the DOS Version dropdown, focus stayed on
that combobox even after clicking another field — its highlight ring
lingered and subsequent wheel events could still mutate its value.
Now any click outside a Combobox transfers focus to the toplevel, the
same way a native Win32 ComboBox loses focus when you click off it. - Selecting a value defocuses immediately. As soon as
<<ComboboxSelected>>fires,selection_clear()runs and focus
moves to the toplevel — the visible highlight no longer survives the
dropdown closing.
Scope
Only src/dosforge/_gui/widgets.py (new apply_combobox_polish helper),
src/dosforge/_gui/__init__.py (wires the helper into the Tk root
during DosForgeGUI.__init__), and src/dosforge/_gui/create_view.py
(adds <<ComboboxSelected>> defocus on every _Combo instance) were
touched. The TUI, CLI, and disk/boot pipelines are unaffected.
Tests
New tests/test_gui_combobox_polish.py smoke-tests the helper against a
hidden Tk root (skips cleanly on truly headless runners). All
existing targeted-sweep tests still pass.
Upgrade
No data-format changes. Drop-in replacement for v0.9.50.