Fix missing confirm quit dialog on macOS, after recent changes.

This commit is contained in:
Brecht Van Lommel 2018-03-28 10:50:06 +02:00
parent be587d76ef
commit 4bd5b824b0
4 changed files with 17 additions and 6 deletions

@ -261,6 +261,11 @@ public:
*/ */
GHOST_TSuccess handleKeyEvent(void *eventPtr); GHOST_TSuccess handleKeyEvent(void *eventPtr);
/**
* Informs if the system provides native dialogs (eg. confirm quit)
*/
virtual bool supportsNativeDialogs(void);
protected: protected:
/** /**
* Initializes the system. * Initializes the system.

@ -1658,3 +1658,9 @@ void GHOST_SystemCocoa::putClipboard(GHOST_TInt8 *buffer, bool selection) const
[pool drain]; [pool drain];
} }
bool
GHOST_SystemCocoa::supportsNativeDialogs(void)
{
return false;
}

@ -636,9 +636,9 @@ GHOST_SystemSDL::addDirtyWindow(GHOST_WindowSDL *bad_wind)
} }
bool bool
GHOST_SystemSDL::supportsNativeDialogs(void) GHOST_SystemSDL::supportsNativeDialogs(void)
{ {
return false return false;
} }
GHOST_TSuccess GHOST_SystemSDL::getButtons(GHOST_Buttons& buttons) const GHOST_TSuccess GHOST_SystemSDL::getButtons(GHOST_Buttons& buttons) const

@ -208,10 +208,10 @@ public:
*/ */
static GHOST_TSuccess pushDragDropEvent(GHOST_TEventType eventType, GHOST_TDragnDropTypes draggedObjectType, GHOST_WindowWin32 *window, int mouseX, int mouseY, void *data); static GHOST_TSuccess pushDragDropEvent(GHOST_TEventType eventType, GHOST_TDragnDropTypes draggedObjectType, GHOST_WindowWin32 *window, int mouseX, int mouseY, void *data);
/** /**
* Confirms quitting he program when there is just one window left open * Confirms quitting he program when there is just one window left open
* in the application * in the application
*/ */
int confirmQuit(GHOST_IWindow *window) const; int confirmQuit(GHOST_IWindow *window) const;
protected: protected: