mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-29 09:30:46 +02:00
CIFGenSubcells() and extSubtree() set GrDisplayStatus = DISPLAY_IN_PROGRESS while they run a 5-second progress timer, then unconditionally restore DISPLAY_IDLE on exit. In native builds the initial state is always IDLE, so this is harmless. In WASM/headless builds the null display driver sets DISPLAY_SUSPEND at startup, and forcing IDLE at the end of these long operations destroys the SUSPEND guard that protects WindUpdate() from running display callbacks against a non-existent screen. Save the previous status before overwriting and restore it on exit. This is also reentrant-safe: nested DISPLAY_IN_PROGRESS scopes (e.g. extract followed by gds write) now keep the outer state intact. * cif/CIFhier.c — CIFGenSubcells * extract/ExtSubtree.c — extSubtree