diff options
| author | Jonathan "Geenz" Goodman <geenz@lindenlab.com> | 2025-10-10 17:06:18 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-10 17:06:18 -0400 |
| commit | 2a620a9447b7d0544d5c500d88b4128565486018 (patch) | |
| tree | de0269e363215fbc3b92f8b63e33bc1d8b48a1b3 /indra/newview/llviewerwindow.cpp | |
| parent | dd9ea09d50ef5a4992d2ae29d2970ce05998bad0 (diff) | |
| parent | bab2137c12273777fcf7c176d1d4f385bf032887 (diff) | |
Merge pull request #4810 from secondlife/geenz/2025.07-lua-editor
Update Lua editor with latest 2025.07
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
| -rw-r--r-- | indra/newview/llviewerwindow.cpp | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 8abced7e8f..3849c286c5 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1466,18 +1466,43 @@ void LLViewerWindow::handleMouseLeave(LLWindow *window) LLToolTipMgr::instance().blockToolTips(); } -bool LLViewerWindow::handleCloseRequest(LLWindow *window) +bool LLViewerWindow::handleCloseRequest(LLWindow *window, bool from_user) { if (!LLApp::isExiting() && !LLApp::isStopped()) { - // User has indicated they want to close, but we may need to ask - // about modified documents. - LLAppViewer::instance()->userQuit(); - // Don't quit immediately + if (from_user) + { + // User has indicated they want to close, but we may need to ask + // about modified documents. + LLAppViewer::instance()->userQuit(); + // Don't quit immediately + } + else + { + // OS is asking us to quit, assume we have time and start cleanup + LLAppViewer::instance()->requestQuit(); + } } return false; } +bool LLViewerWindow::handleSessionExit(LLWindow* window) +{ + if (!LLApp::isExiting() && !LLApp::isStopped()) + { + // Viewer received WM_ENDSESSION and app will be killed soon if it doesn't respond + LLAppViewer* app = LLAppViewer::instance(); + app->sendSimpleLogoutRequest(); + app->earlyExitNoNotify(); + + // Not viewer's fault, remove marker files so + // that statistics won't consider this to be a crash + app->removeMarkerFiles(); + return false; + } + return true; +} + void LLViewerWindow::handleQuit(LLWindow *window) { if (gNonInteractive) @@ -1897,7 +1922,7 @@ LLViewerWindow::LLViewerWindow(const Params& p) p.ignore_pixel_depth, 0, max_core_count, - max_gl_version); //don't use window level anti-aliasing + max_gl_version); //don't use window level anti-aliasing, windows only if (NULL == mWindow) { |
