[Bf-blender-cvs] [4bd5b824b08] master: Fix missing confirm quit dialog on macOS, after recent changes.

Brecht Van Lommel noreply at git.blender.org
Wed Mar 28 10:54:36 CEST 2018


Commit: 4bd5b824b08823d2ed26161a7260672411efddd2
Author: Brecht Van Lommel
Date:   Wed Mar 28 10:50:06 2018 +0200
Branches: master
https://developer.blender.org/rB4bd5b824b08823d2ed26161a7260672411efddd2

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

===================================================================

M	intern/ghost/intern/GHOST_SystemCocoa.h
M	intern/ghost/intern/GHOST_SystemCocoa.mm
M	intern/ghost/intern/GHOST_SystemSDL.cpp
M	intern/ghost/intern/GHOST_SystemWin32.h

===================================================================

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:



More information about the Bf-blender-cvs mailing list