News for hackers. Stuff that matters.
Re:Why I left Mac for Windows: Apple has given up by int_19h on Monday March 06, 2017 @02:02AM (#13801141)
When Windows sends WM_CLOSE for any reason, it will wait for some time for the app to react (not necessarily close itself, just process the message). But if it does not react soon enough, Windows will mark the app as hanging, and you'll get that standard wait-or-close dialog.

However, Alt+F4 translating to WM_CLOSE is also handled by the app message loop - i.e. Windows sends WM_KEYDOWN events for those keys, and when they get to the event loop, it's supposed to call TranslateMessage. That one normally handles WM_KEYDOWN -> WM_CHAR translation, but it will also handle any shortcuts, and this includes Alt+F4. So if the app is hanging, messages aren't pumped, and the shortcut doesn't work. To send WM_CLOSE, you'd need to use the close button on the window.

So if the app does close on Alt+F4, it was, at the minimum, pumping messages and invoking TranslateMessage on them.

Re:Why I left Mac for Windows: Apple has given up by Neeek on Monday March 06, 2017 @06:55PM (#13807191)
Thanks for the detailed reply! I learned something today.