Closing dock tabs with cmd+w on mac (#3849)

* Change Close menu item accelerator

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Listening global keydown event in <Dock/>

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Prevent terminal to fire custom event

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Refresh tooltip hint

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Make Tab line gray if Dock isn't focused

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev authored and GitHub committed 2021-10-11 10:06:43 +03:00
1 parent a3765211de
commit b2b3c44695
5 files changed
+44 -20

No files matched your search

+10 -5
View File
@@ -147,13 +147,18 @@ export function buildMenu(windowManager: WindowManager) {
}
}
]),
{ type: "separator" },
{
role: "close",
label: "Close Window"
},
...(isMac ? [
{
role: "close",
label: "Close Window",
accelerator: "Shift+Cmd+W"
}
] as MenuItemConstructorOptions[] : []),
...ignoreOnMac([
{ type: "separator" },
{
label: "Exit",
accelerator: "Alt+F4",