From 888f72ca9a5e2fcd22b4839c7aebce12e03c336e Mon Sep 17 00:00:00 2001 From: John Scipione Date: Tue, 10 Jun 2014 00:59:50 -0400 Subject: [PATCH] Tracker: close Desktop window on switch to spatial mode If you have the Desktop window open when you switch to spatial mode this will now close the window. You aren't allowed to have the Desktop open in 2 places symultaneously in spatial mode. --- src/kits/tracker/ContainerWindow.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/kits/tracker/ContainerWindow.cpp b/src/kits/tracker/ContainerWindow.cpp index 859e649c98..b1ef25d003 100644 --- a/src/kits/tracker/ContainerWindow.cpp +++ b/src/kits/tracker/ContainerWindow.cpp @@ -1674,6 +1674,14 @@ BContainerWindow::MessageReceived(BMessage* message) SetPathWatchingEnabled(settings.ShowNavigator() || settings.ShowFullPathInTitleBar()); } + + if (!settings.SingleWindowBrowse() + && dynamic_cast(this) == NULL + && TargetModel()->IsDesktop()) { + // close the "Desktop" window, but not the Desktop + this->Quit(); + } + SetSingleWindowBrowseShortcuts( settings.SingleWindowBrowse()); break;