Fixed shutting down apps with file panels - no more hang:

* if file panels shouldn't be quit, we no longer call QuitRequested() for
  them and stop quitting windows (which left normal windows open, because
  file panels always return "false" in QuitRequested())


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15715 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-12-29 14:49:28 +00:00
parent cd2b129d07
commit 9f8f6275f6
2 changed files with 9 additions and 6 deletions

View File

@ -1144,9 +1144,13 @@ BApplication::window_quit_loop(bool quitFilePanels, bool force)
for (int32 i = looperList.CountItems(); i-- > 0; ) {
BWindow *window = dynamic_cast<BWindow *>((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;

View File

@ -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;
}