diff options
| author | Jonathan "Geenz" Goodman <geenz@lindenlab.com> | 2026-05-20 12:05:18 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-20 12:05:18 -0400 |
| commit | 40cd1617a6a663fb921265101307454b490ec4ba (patch) | |
| tree | 2f13741295c385172364e3fa940d7591f32fac4e /indra/newview/llviewerwindow.cpp | |
| parent | 9c2ee024bef564ebb6e2e8942b43ffae1d99232c (diff) | |
| parent | df844170600608b37c2725f7a263f1de3b055618 (diff) | |
Merge branch 'develop' into geenz/26.3-to-develop
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
| -rw-r--r-- | indra/newview/llviewerwindow.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 0f3f24d1af..dbf9fe6bf2 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -38,6 +38,7 @@ #include "llagent.h" #include "llagentcamera.h" +#include "llcallbacklist.h" #include "llcommandhandler.h" #include "llcommunicationchannel.h" #include "llfloaterreg.h" @@ -1466,12 +1467,32 @@ void LLViewerWindow::handleMouseLeave(LLWindow *window) LLToolTipMgr::instance().blockToolTips(); } +void LLViewerWindow::handlePreCloseRequest() +{ + // WINDOW THREAD! since we need this to act fast. + if (!LLApp::isExiting() && !LLApp::isStopped()) + { + LLAppViewer::instance()->createCloseRequestMarker(); + } + +} + bool LLViewerWindow::handleCloseRequest(LLWindow *window, bool from_user) { if (!LLApp::isExiting() && !LLApp::isStopped()) { if (from_user) { + // Task naamger kills viewer after 1 second, 3 seconds + // is overkill, but decided to be on a safe side. + doAfterInterval([]() + { + // if user quits, marker will be cleaned by cleanup, + // if user cancels quit, marker will be cleaned here, + // but if task manager kills us, marker stays. + LLAppViewer::instance()->removeCloseRequestMarker(); + }, 3.0f); + // User has indicated they want to close, but we may need to ask // about modified documents. LLAppViewer::instance()->userQuit(); |
