diff options
author | egladil <egladil@openttd.org> | 2007-11-25 12:58:32 +0000 |
---|---|---|
committer | egladil <egladil@openttd.org> | 2007-11-25 12:58:32 +0000 |
commit | b24392dfddb6710584927efba2ba6d4cc971aad6 (patch) | |
tree | 5c71ac7c2f93b5d56d9d8b17bd55b31e0a6185e6 /src | |
parent | ca30e9b84964864746a4958d4d00b83c30a06726 (diff) | |
download | openttd-b24392dfddb6710584927efba2ba6d4cc971aad6.tar.xz |
(svn r11520) -Fix: [OSX] The cocoa video driver let the mouse cursor escape the window when using rmb scrolling. Thanks ln- for pointing this out and providing a fix.
Diffstat (limited to 'src')
-rw-r--r-- | src/video/cocoa/event.mm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/video/cocoa/event.mm b/src/video/cocoa/event.mm index 612ed3f49..18002b439 100644 --- a/src/video/cocoa/event.mm +++ b/src/video/cocoa/event.mm @@ -430,7 +430,6 @@ static bool QZ_PollEvent() switch ([event type]) { case NSMouseMoved: case NSOtherMouseDragged: - case NSRightMouseDragged: case NSLeftMouseDragged: pt = _cocoa_subdriver->GetMouseLocation(event); if (!_cocoa_subdriver->MouseIsInsideView(&pt) && @@ -444,6 +443,12 @@ static bool QZ_PollEvent() QZ_MouseMovedEvent((int)pt.x, (int)pt.y); break; + case NSRightMouseDragged: + pt = _cocoa_subdriver->GetMouseLocation(event); + QZ_HideMouse(); + QZ_MouseMovedEvent((int)pt.x, (int)pt.y); + break; + case NSLeftMouseDown: { uint32 keymask = 0; |