_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
This commit is contained in:
Jérôme Duval 2008-04-20 16:47:30 +00:00
parent 0efb25854a
commit 727f8f30c8

View File

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