diff options
author | Geenz <geenz@geenzo.com> | 2013-01-01 11:32:53 -0500 |
---|---|---|
committer | Geenz <geenz@geenzo.com> | 2013-01-01 11:32:53 -0500 |
commit | ddb48d51d996b18063b111faa3b7e709160074d9 (patch) | |
tree | f64cab16299cec07756dea34823ab3749b4d1ec3 /indra/newview/llappviewermacosx.cpp | |
parent | 7a1593c083a7ed6e3d6589d5dd656354d748b8ce (diff) |
More things in this commit:
- Removed the callback system in favor of simply defining functions in a header to later be implemented in whichever file is most convenient for what we want to do (i.e., calling LLWindow callbacks within LLWindowMacOSX, setting cursors in llwindowmacosx-objc.mm, etc.)
- Viewer shutdown now works appropriately
- Added a bit of debugging code to test if a key has been handled by the UI or not (useful for tracking down the mystery of the enter key not being handled)
- Setup a cocoa quit handler within the application delegate that intercepts any termination requests
Diffstat (limited to 'indra/newview/llappviewermacosx.cpp')
-rw-r--r-- | indra/newview/llappviewermacosx.cpp | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index a1c8b7699d..6e7b91347b 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -55,15 +55,6 @@ namespace char** gArgV; LLAppViewerMacOSX* gViewerAppPtr; - - OSErr AEQuitHandler(const AppleEvent *messagein, AppleEvent *reply, long refIn) - { - OSErr result = noErr; - - LLAppViewer::instance()->userQuit(); - - return(result); - } } bool initViewer() @@ -95,26 +86,33 @@ bool initViewer() void handleQuit() { - if(!LLApp::isError()) - { - gViewerAppPtr->cleanup(); - } - - delete gViewerAppPtr; - gViewerAppPtr = NULL; + LLAppViewer::instance()->userQuit(); } bool runMainLoop() { bool ret = LLApp::isQuitting(); - if (!ret) + if (!ret && gViewerAppPtr != NULL) { ret = gViewerAppPtr->mainLoop(); + } else { + ret = true; } return ret; } +void cleanupViewer() +{ + if(!LLApp::isError()) + { + gViewerAppPtr->cleanup(); + } + + delete gViewerAppPtr; + gViewerAppPtr = NULL; +} + int main( int argc, char **argv ) { // Store off the command line args for use later. |