View Single Post
Old 06-12-2019, 03:35 PM   #683
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,753
Default

Quote:
Originally Posted by Sexan View Post
Yeah, one osX user had issue when he can start but cannot draw since tracks under mouse were not detected. I will upload one script with debugging only for osx users so we can check whats going on in that function that retrieves tracks from mouse.

deeb can you add this msg line here in this function?

and then one just below "isvisible"

This function returns track under mouse and the problem is there somewhere
The problem might be caused by the fact that, on OSX, screen coordinates are given relative to the *bottom* left corner, with the positive X axis pointing upwards, whereas on Windows and Linux, screen coordinates are relative to the *top* left corner, with the X axis pointing downwards. These lines might therefore not work on OSX:
Code:
local _, _, top, _, bottom = reaper.JS_Window_GetRect(window)
if top <= mouse.y and bottom > mouse.y then
BTW, this isn't a bug in the ReaScriptAPI extension -- all native OSX functions work the same way, even REAPER's own GetMousePosition().

Last edited by juliansader; 06-12-2019 at 03:45 PM.
juliansader is online now   Reply With Quote