summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2013-08-05 20:35:53 +0000
committermichi_cc <michi_cc@openttd.org>2013-08-05 20:35:53 +0000
commitd23fdfa4038b0a893138652eeccf67d3edc450cf (patch)
tree72ca1d750f461d3c687ac1038f63b460d8c270f3 /src
parent408c595eb8d5edfa823d2857c7eda903130b222d (diff)
downloadopenttd-d23fdfa4038b0a893138652eeccf67d3edc450cf.tar.xz
(svn r25659) -Fix [FS#4420]: [OSX] System mouse cursor could become visible during dragging. (Matthieu)
Diffstat (limited to 'src')
-rw-r--r--src/video/cocoa/event.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/video/cocoa/event.mm b/src/video/cocoa/event.mm
index e9753fdc7..81de0b7b2 100644
--- a/src/video/cocoa/event.mm
+++ b/src/video/cocoa/event.mm
@@ -542,6 +542,15 @@ static bool QZ_PollEvent()
_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 ];
}