From 9aaa455e5d27690587a1ce1c9641ea7718874e10 Mon Sep 17 00:00:00 2001 From: egladil Date: Sun, 25 Nov 2007 12:58:32 +0000 Subject: [PATCH] (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. --- src/video/cocoa/event.mm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/video/cocoa/event.mm b/src/video/cocoa/event.mm index 612ed3f498..18002b439b 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;