diff options
-rw-r--r-- | indra/llwindow/llopenglview-objc.mm | 7 | ||||
-rw-r--r-- | indra/llwindow/llwindowmacosx-objc.h | 1 | ||||
-rw-r--r-- | indra/llwindow/llwindowmacosx.cpp | 8 |
3 files changed, 14 insertions, 2 deletions
diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index e89c9267d5..1d26ca5ca1 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -466,16 +466,19 @@ - (BOOL) becomeFirstResponder { - NSLog(@"Window gained focus!"); callFocus(); return true; } - (BOOL) resignFirstResponder { - NSLog(@"Window lost focus!"); callFocus(); return true; } +- (void) close +{ + callQuitHandler(); +} + @end diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h index a0eab61e7c..6793666927 100644 --- a/indra/llwindow/llwindowmacosx-objc.h +++ b/indra/llwindow/llwindowmacosx-objc.h @@ -96,6 +96,7 @@ void callMiddleMouseUp(float *pos, unsigned int mask); void callFocus(); void callFocusLost(); void callModifier(unsigned int mask); +void callQuitHandler(); #include <string> void callHandleDragEntered(std::string url); diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index ac0fa54a68..24f73c5631 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -362,6 +362,14 @@ void callHandleDragDropped(std::string url) gWindowImplementation->handleDragNDrop(url, LLWindowCallbacks::DNDA_DROPPED); } +void callQuitHandler() +{ + if(gWindowImplementation->getCallbacks()->handleCloseRequest(gWindowImplementation)) + { + gWindowImplementation->getCallbacks()->handleQuit(gWindowImplementation); + } +} + void LLWindowMacOSX::updateMouseDeltas(float* deltas) { if (mCursorDecoupled) |