Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorMaxime Curioni <maxime.curioni@gmail.com>2008-05-05 20:56:44 +0400
committerMaxime Curioni <maxime.curioni@gmail.com>2008-05-05 20:56:44 +0400
commitec906913842a9b56805b010153295419f198ed6a (patch)
tree1499a319c77b12f19ca8c717f7185f8211b7adb9 /intern
parent1cf33787932aabc9e2d812f4cf50655059dcbff2 (diff)
parent945a083e70b79d361f5a9b1be76c9722565c9fe8 (diff)
merge to 14689, Freestyle library changes, SConscript start
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_SystemCarbon.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/intern/ghost/intern/GHOST_SystemCarbon.cpp b/intern/ghost/intern/GHOST_SystemCarbon.cpp
index 568f7ecf9b8..78c25997806 100644
--- a/intern/ghost/intern/GHOST_SystemCarbon.cpp
+++ b/intern/ghost/intern/GHOST_SystemCarbon.cpp
@@ -34,10 +34,9 @@
* @date May 7, 2001
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include <Carbon/Carbon.h>
+#include <ApplicationServices/ApplicationServices.h>
#include "GHOST_SystemCarbon.h"
#include "GHOST_DisplayManagerCarbon.h"
@@ -52,6 +51,7 @@
#include "GHOST_WindowManager.h"
#include "GHOST_WindowCarbon.h"
#include "GHOST_NDOFManager.h"
+#include "AssertMacros.h"
#define GHOST_KEY_SWITCH(mac, ghost) { case (mac): ghostKey = (ghost); break; }
@@ -1121,12 +1121,15 @@ GHOST_TUns8* GHOST_SystemCarbon::getClipboard(int flag) const
OSStatus err = noErr;
GHOST_TUns8 * temp_buff;
CFRange range;
+ OSStatus syncFlags;
err = PasteboardCreate(kPasteboardClipboard, &inPasteboard);
if(err != noErr) { return NULL;}
- err = PasteboardSynchronize( inPasteboard );
- if(err != noErr) { return NULL;}
+ syncFlags = PasteboardSynchronize( inPasteboard );
+ /* as we always get in a new string, we can safely ignore sync flags if not an error*/
+ if(syncFlags <0) { return NULL;}
+
err = PasteboardGetItemIdentifier( inPasteboard, 1, &itemID );
if(err != noErr) { return NULL;}
@@ -1152,15 +1155,18 @@ GHOST_TUns8* GHOST_SystemCarbon::getClipboard(int flag) const
void GHOST_SystemCarbon::putClipboard(GHOST_TInt8 *buffer, int flag) const
{
if(flag == 1) {return;} //If Flag is 1 means the selection and is used on X11
+
PasteboardRef inPasteboard;
CFDataRef textData = NULL;
OSStatus err = noErr; /*For error checking*/
+ OSStatus syncFlags;
err = PasteboardCreate(kPasteboardClipboard, &inPasteboard);
if(err != noErr) { return;}
- err = PasteboardSynchronize( inPasteboard );
- if(err != noErr) { return;}
+ syncFlags = PasteboardSynchronize( inPasteboard );
+ /* as we always put in a new string, we can safely ignore sync flags */
+ if(syncFlags <0) { return;}
err = PasteboardClear( inPasteboard );
if(err != noErr) { return;}