9 ms·
> does Alt-F4 not do the right thing on Windows Alt-F4 closes the _window_, not the application. If the application can 'survive' without a window, not exiting
by tpxl 4y ago
> does Alt-F4 not do the right thing on Windows
Alt-F4 closes the _window_, not the application. If the application can 'survive' without a window, not exiting the application is the correct behaviour.
- debugnik 4y agoExcept for Discord, which actually closes the entire application on Alt-F4 instead of just the window.
- Semaphor 4y agoHuh. You are right. Alt+F4 closes the application, clicking the X closes the window. Kinda inconsistent.
- LoganDark 4y agoAlt+F4 closes the window, clicking the X causes the window to hide, not close.
- lightedman 4y agoAlt-F4 invokes different processes than the X button does. The X button is more akin to CTRL-F4.
- debugnik 4y agoNah, they both send WM_CLOSE to the window. The actual problem is that Discord uses its own non-native window frame and reimplements the X button differently than they handle the actual close event.
- tpxl 4y agoAlt-F4 closes the window for me on Discord, not the app. There's a setting for that I suppose.
- ttyyzz 4y agoAlt+F4 kills the process.
- ttyyzz 4y agoguys i dont know why im getting downvoted - on my windows 10 machine, newest discord version -> alt+f4 kills the process and x-ing the app does not.
- CodesInChaos 4y agoAlt+F4 asks the window to close. If it's the main window, this will by default terminate the message loop, shutting down the application. But the application is free to handle the message whatever way it likes. Asking for confirmation, ignoring it, hiding it or closing the window without terminating the process. Like many (most?) applications which show a notification icon, discord hides the main window when the user presses Alt+F4 or clicks on the X instead of closing it.
- simiones 4y agoNope, Alt+F4 is the close window shortcut. This is even visible in the OS-controller Window Menu - hit Alt+Spacebar in any window of any app, and you'll see the Window menu appear, which will include an option for Close (the current window), showing that the shortcut for it is Alt+F4. This is even true for modal dialogs (if they are real Windows modal dialogs).
- phepranto 4y agoWeirdly enough, Alt+Spacebar, then clicking close only closes the window (minimizing to the tray), but just hitting Alt+F4 kills the process.
- simiones 4y agoYou mean for Discord I assume? That is strange indeed - though of course Windows has always allowed apps to modify any kind of behavior they want (for better and for worse).
- 4y ago