Skip to content

Commit a82cf5c

Browse files
authored
Merge pull request #53 from dteoh/44-new-tab-click-dock-icon
Maybe open a new window when clicking on dock icon
2 parents d053c60 + ba38472 commit a82cf5c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

devdocs-macos/AppDelegate.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ class AppDelegate: NSObject, NSApplicationDelegate {
2828
DocumentationWindows.shared.persist()
2929
}
3030

31+
func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {
32+
DocumentationWindows.shared.newWindowIfNoWindow()
33+
return true
34+
}
35+
3136
@IBAction func newTab(_ sender: Any) {
3237
DocumentationWindows.shared.newWindow()
3338
}

0 commit comments

Comments
 (0)