diff --git a/DuckDuckGo/MainWindow/MainViewController.swift b/DuckDuckGo/MainWindow/MainViewController.swift index adae427d70..843a190735 100644 --- a/DuckDuckGo/MainWindow/MainViewController.swift +++ b/DuckDuckGo/MainWindow/MainViewController.swift @@ -209,6 +209,14 @@ final class MainViewController: NSViewController { tabBarViewController.hideTabPreview() } + func windowWillMiniaturize() { + tabBarViewController.hideTabPreview() + } + + func windowWillEnterFullScreen() { + tabBarViewController.hideTabPreview() + } + func toggleBookmarksBarVisibility() { updateBookmarksBarViewVisibility(visible: !(mainView.bookmarksBarHeightConstraint.constant > 0)) } diff --git a/DuckDuckGo/MainWindow/MainWindowController.swift b/DuckDuckGo/MainWindow/MainWindowController.swift index d37dfab18a..06b35517fe 100644 --- a/DuckDuckGo/MainWindow/MainWindowController.swift +++ b/DuckDuckGo/MainWindow/MainWindowController.swift @@ -203,6 +203,11 @@ extension MainWindowController: NSWindowDelegate { func windowWillEnterFullScreen(_ notification: Notification) { mainViewController.tabBarViewController.draggingSpace.isHidden = true + mainViewController.windowWillEnterFullScreen() + } + + func windowWillMiniaturize(_ notification: Notification) { + mainViewController.windowWillMiniaturize() } func windowDidEnterFullScreen(_ notification: Notification) {