Displaying the warning on file load depended on `wm->winactive` being set, and didn't work when loading a file from the file-open window or when loading files using a command-line argument. Resolve using the first window as a fallback. This happens to resolve #109770, although not freeing timers on exit is likely to be an issue under other circumstances.