src/video/cocoa/SDL_cocoamouse.m
changeset 7100 ffd910de700b
parent 7099 54f187c036e2
child 7106 31f8acac196b
--- a/src/video/cocoa/SDL_cocoamouse.m	Tue Apr 23 18:47:41 2013 -0700
+++ b/src/video/cocoa/SDL_cocoamouse.m	Tue Apr 23 18:47:44 2013 -0700
@@ -162,7 +162,13 @@
     if (cursor) {
         NSCursor *nscursor = (NSCursor *)cursor->driverdata;
 
-        [nscursor set];
+        /* We're possibly executing from an event handler where this operation
+         * is unsupported. This will execute it in the main Cocoa event loop
+         * after this returns.
+         */
+        [nscursor performSelectorOnMainThread:@selector(set)
+                                   withObject:nil
+                                waitUntilDone:NO];
 
 		if (!isShown) {
 			[NSCursor unhide];