From 727f8f30c88209dd79197947e6bb24739d6d4e57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Sun, 20 Apr 2008 16:47:30 +0000 Subject: [PATCH] _QuitAllWindows()) calls _WindowQuitLoop() twice but we don't want to check two times a window (hence the use of the xor operator) this fixes bug #1762 (Installer: trying to close it via alt+q shows warning twice) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25084 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/app/Application.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/kits/app/Application.cpp b/src/kits/app/Application.cpp index 295871eba2..d6a968b5e6 100644 --- a/src/kits/app/Application.cpp +++ b/src/kits/app/Application.cpp @@ -1350,6 +1350,7 @@ BApplication::write_drag(_BSession_ *session, BMessage *message) bool BApplication::_WindowQuitLoop(bool quitFilePanels, bool force) { + bool canQuit = true; int32 index = 0; while (true) { BWindow *window = WindowAt(index); @@ -1364,7 +1365,8 @@ BApplication::_WindowQuitLoop(bool quitFilePanels, bool force) continue; // don't quit file panels if we haven't been asked for it - if (!quitFilePanels && window->IsFilePanel()) { + if (quitFilePanels ^ window->IsFilePanel()) { + canQuit = false; window->Unlock(); index++; continue; @@ -1387,7 +1389,7 @@ BApplication::_WindowQuitLoop(bool quitFilePanels, bool force) // we need to continue at the start of the list again - it // might have changed } - return true; + return canQuit; }