diff --git a/src/kits/app/Application.cpp b/src/kits/app/Application.cpp index 84b802d81b..0e02515d15 100644 --- a/src/kits/app/Application.cpp +++ b/src/kits/app/Application.cpp @@ -1144,9 +1144,13 @@ BApplication::window_quit_loop(bool quitFilePanels, bool force) for (int32 i = looperList.CountItems(); i-- > 0; ) { BWindow *window = dynamic_cast((BLooper *)looperList.ItemAt(i)); - if (window != NULL && window->Lock()) { - if ((window->IsFilePanel() && !quitFilePanels) - || (!force && !window->QuitRequested())) { + // don't quit file panels if we haven't been asked for it + if (window == NULL || (!quitFilePanels && window->IsFilePanel())) + continue; + + if (window->Lock()) { + if (!force && !window->QuitRequested() + && !(quitFilePanels && window->IsFilePanel())) { // the window does not want to quit, so we don't either window->Unlock(); return false; diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index f99f369c21..8f33dd4392 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -2949,10 +2949,9 @@ BWindow::_LastViewChild(BView *parent) void -BWindow::SetIsFilePanel(bool yes) +BWindow::SetIsFilePanel(bool isFilePanel) { - // TODO: is this not enough? - fIsFilePanel = yes; + fIsFilePanel = isFilePanel; }