[Desktop] Windows: alt + F4 should close the window, not quit the application #5071
Replies: 3 comments
-
I am not a programmer, but upon reading MenuItem from Electron Documentation (and specifically Accelerator), it looks like, if desired, this can be fixed by simply replacing "accelerator: 'Alt+F4'," with "accelerator: 'Ctrl+Q'," at system.ts line 329. Alt+F4 shortcut should start working normally then. Unfortunately I am not yet familiar enough with Git to make the change, and I don't know if it would be approved anyway. Also, I see no accelerators for minimize and close in the code, even though they are displayed in the program's GUI and the shortcuts help page (ctrl+M, ctrl+W). Is this why I cannot use those shortcuts (i.e. not due to a bug)? If so, I guess they should be removed from the GUI and the help page, if this is was deliberate choice. While it would be nice to have them, like I said I wouldn't mind their absence if the alt+F4 behavior is fixed. |
Beta Was this translation helpful? Give feedback.
-
Hi @debiedowner, yes, this is not a bug AFAIC. So I filed this under feature request. |
Beta Was this translation helpful? Give feedback.
-
Is it not a bug when the UI indicates that a shortcut does something, when it does something else? Like I said, when I click the Wire logo at the top left corner of the window (or alternatively hit alt + space), it says that the shortcut to close the window is Alt+F4. Indeed, when I click it, it closes the window, not quits the application. I realize that you probably did not deliberately create that context menu - it is just Windows's default menu - but the fact remains that the UI is self-contradictory. If the Alt+F4's current behavior is not a bug, then that context menu entry is a bug. It's just that I would much rather the discrepancy be resolved in favor of Alt+F4=Close, rather than Quit, as it is the expected Windows behavior. |
Beta Was this translation helpful? Give feedback.
-
Using Wire 3.5.2899 on Windows 10 1709, when I click the X button at the top right corner, the Wire window closes to the tray, but continues running. When I click the Wire logo at the top left corner of the window (or alternatively hit alt + space) and then select "x Close alt+F4" from the menu, the same thing happens, as expected.
However, when I press alt + F4, Wire app completely quits, instead of just closing the window. This is the wrong behavior on Windows: in all Windows programs, alt + F4 performs the same function as clicking the X button at the corner, and close the window. Wire should not override this. And seemingly it does not override, as the alt+Space menu indicates that alt+F4 performs its regular function; however, confusingly it actually performs a different function. This caused me to unwittingly quit Wire and not receive messages a number of times.
Looking at the shortcuts help page, on MacOS quit Wire shortcut is ⌘Q; and looking at the code, on Linux it is Ctrl+Q. It should be the same on Windows, Ctrl+Q, which is what many programs that normally close to tray use to completely quit. I don't think that it is necessary for Wire to define an alt+F4 shortcut; Windows automatically makes it do the same thing as the close button.
Additionally, Minimize and Close shortcuts (Ctrl+M and Ctrl+W) do not work for me even though they work when I click on the menu items; however, I would not miss the absence of either if alt+F4 starts working as expected.
Beta Was this translation helpful? Give feedback.
All reactions