Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Terminal Alt+F4 behaviour #17613

Open
ChGen opened this issue Jul 25, 2024 · 5 comments
Open

Windows Terminal Alt+F4 behaviour #17613

ChGen opened this issue Jul 25, 2024 · 5 comments
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal.

Comments

@ChGen
Copy link

ChGen commented Jul 25, 2024

Windows Terminal version

1.20.11781.0

Windows build number

10.0.22631.3880

Other Software

Also reproducible in:
Windows Terminal Preview
Version: 1.21.1772.0

Steps to reproduce

  1. Start Windows Terminal.
  2. Open Settings -> Interaction -> Warn when closing more than one tab -> On -> Save.
  3. Close Settings tab and open any second terminal tab.
  4. Try to close terminal window with the X button in the upper right corner. It will ask for confirmation.
  5. Try to close terminal window with Alt+F4 shortcut. It will close window without confirmation.
  6. When Settings tab is active, it sometimes asks for confilmation when I press Alt+F4, but mostly not.

Expected Behavior

Windows Terminal should ask for confirmation when closing window in any way: titlebar button, Alt+F4, Alt+Space menu, Taskbar menu, etc.

Actual Behavior

Pressing Alt+F4 shortcut will close Window Terminal window without confirmation, but pressing title bar 'close' button shows confirmation according to "Settings -> Interaction -> Warn when closing more than one tab" configuration.

@ChGen ChGen added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jul 25, 2024
@j4james
Copy link
Collaborator

j4james commented Jul 25, 2024

I think this may be a known problem, because there are a few open issues related to the close confirmation that could potentially cover this scenario. Possibly #2976 or #6549.

@ChGen
Copy link
Author

ChGen commented Jul 25, 2024

Indeed, looks like those are similar, but I think this case is quite straightforward and could be fixed directly, without discussion of complex logic and consequences.
Actually, Alt+F4 seems to be the only unhandled way of closing the window. Alt+Space menu, taskbar menu and close button all show confirmations correctly.

@carlos-zamora carlos-zamora added Help Wanted We encourage anyone to jump in on these. Area-User Interface Issues pertaining to the user interface of the Console or Terminal Product-Terminal The new Windows Terminal. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jul 31, 2024
@carlos-zamora carlos-zamora modified the milestones: Up Next, Terminal v1.23 Jul 31, 2024
@codenotworking
Copy link

So this was fixed a long time ago (see #2526), but it creeped up again?

I did a work-around by reassigning alt+f4 to quit:

{ "command": "quit", "keys": "alt+f4" }

quit shows a confirmation dialog asking to close the window, regardless if confirmCloseAllTabs setting is explicitly set to false or not present.

@ChGen
Copy link
Author

ChGen commented Aug 18, 2024

@codenotworking , thanks, with this workaround it indeed asks confirmation, but it's for the whole app now. Still, its better than nothing. Feels safer with confirmation :)

@ClaireCJS
Copy link

Can't wait for this to be added.

When you have 4 tabs open, and some of the tabs have 6 carefully arranged panes, some monitoring active processes

And you have 4 screens, so you think your Alt-F4 is going to the app under your mouse pointer, but you haven't actually clicked it yet...

...BAM! LOST ALL THAT WORK! OMG

Can't wait for this to be fixed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

5 participants