diff options
author | Damien Plisson <damien.plisson@yahoo.fr> | 2009-10-14 12:24:40 +0400 |
---|---|---|
committer | Damien Plisson <damien.plisson@yahoo.fr> | 2009-10-14 12:24:40 +0400 |
commit | 6f2146e84821396cecbc2f27c20868596bb8f13f (patch) | |
tree | e371cc15b293ab8b0e3f7e60f3dd67e24b22468c /intern | |
parent | 828e3f30596d89fcad0e6481f88f006d51737c11 (diff) |
Cocoa : bugfix on continuous grab (cursor was returning to a wrong position upon button grab end)
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowCocoa.mm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm index fd68b6200ee..999ec0de9c1 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.mm +++ b/intern/ghost/intern/GHOST_WindowCocoa.mm @@ -873,7 +873,10 @@ GHOST_TSuccess GHOST_WindowCocoa::setWindowCursorGrab(bool grab, bool warp, bool setCursorWarpAccum(-x_new, -y_new); } else { - m_systemCocoa->setCursorPosition(m_cursorWarpInitPos[0], m_cursorWarpInitPos[1]); + GHOST_TInt32 x_new, y_new; + //get/set cursor position works in screen coordinates + clientToScreen(m_cursorWarpInitPos[0], m_cursorWarpInitPos[1], x_new, y_new); + m_systemCocoa->setCursorPosition(x_new, y_new); setCursorWarpAccum(0, 0); } |