From 4bd5b824b08823d2ed26161a7260672411efddd2 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 28 Mar 2018 10:50:06 +0200 Subject: Fix missing confirm quit dialog on macOS, after recent changes. --- intern/ghost/intern/GHOST_SystemCocoa.h | 5 +++++ intern/ghost/intern/GHOST_SystemCocoa.mm | 6 ++++++ intern/ghost/intern/GHOST_SystemSDL.cpp | 4 ++-- intern/ghost/intern/GHOST_SystemWin32.h | 8 ++++---- 4 files changed, 17 insertions(+), 6 deletions(-) (limited to 'intern') diff --git a/intern/ghost/intern/GHOST_SystemCocoa.h b/intern/ghost/intern/GHOST_SystemCocoa.h index 6802ad42c7b..605643c20a5 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.h +++ b/intern/ghost/intern/GHOST_SystemCocoa.h @@ -261,6 +261,11 @@ public: */ GHOST_TSuccess handleKeyEvent(void *eventPtr); + /** + * Informs if the system provides native dialogs (eg. confirm quit) + */ + virtual bool supportsNativeDialogs(void); + protected: /** * Initializes the system. diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index e9fffb6f60b..916da546669 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -1658,3 +1658,9 @@ void GHOST_SystemCocoa::putClipboard(GHOST_TInt8 *buffer, bool selection) const [pool drain]; } + +bool +GHOST_SystemCocoa::supportsNativeDialogs(void) +{ + return false; +} diff --git a/intern/ghost/intern/GHOST_SystemSDL.cpp b/intern/ghost/intern/GHOST_SystemSDL.cpp index db555910f4b..d7860577338 100644 --- a/intern/ghost/intern/GHOST_SystemSDL.cpp +++ b/intern/ghost/intern/GHOST_SystemSDL.cpp @@ -636,9 +636,9 @@ GHOST_SystemSDL::addDirtyWindow(GHOST_WindowSDL *bad_wind) } bool -GHOST_SystemSDL::supportsNativeDialogs(void) +GHOST_SystemSDL::supportsNativeDialogs(void) { - return false + return false; } GHOST_TSuccess GHOST_SystemSDL::getButtons(GHOST_Buttons& buttons) const diff --git a/intern/ghost/intern/GHOST_SystemWin32.h b/intern/ghost/intern/GHOST_SystemWin32.h index 099d14e68ae..7f4d04074f4 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.h +++ b/intern/ghost/intern/GHOST_SystemWin32.h @@ -208,10 +208,10 @@ public: */ 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 - * in the application - */ + /** + * Confirms quitting he program when there is just one window left open + * in the application + */ int confirmQuit(GHOST_IWindow *window) const; protected: -- cgit v1.2.3