changeset 20684:06da686976cc draft

-Fix [FS#4420]: [OSX] System mouse cursor could become visible during dragging. (Matthieu)
author Michael Lutz <michi@icosahedron.de>
date Tue, 26 Feb 2013 22:09:08 +0100
parents 877105840549
children c82c71b2cf44
files src/video/cocoa/event.mm
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/cocoa/event.mm
+++ b/src/video/cocoa/event.mm
@@ -542,6 +542,15 @@
 			_cursor.v_wheel -= (int)([ event deltaY ] * 5 * _settings_client.gui.scrollwheel_multiplier);
 			break;
 
+		case NSCursorUpdate:
+		case NSMouseEntered:
+		case NSMouseExited:
+			/* Catch these events if the cursor is dragging. During dragging, we reset
+			 * the mouse position programmatically, which would trigger OS X to show
+			 * the default arrow cursor if the events are propagated. */
+			if (_cursor.fix_at) break;
+			/* FALL THROUGH */
+
 		default:
 			[ NSApp sendEvent:event ];
 	}