Setup the quit handler for when the user attempts to close the window. This restores the previous functionality of asking the user if they want to quit.
parent
9a85a9d6bf
commit
21aa4b9c24
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue