As shown in Figure 1, I have got the global mouse cursor coordinates and loaded an NSWindow next to it. (Upper right corner of the picture)
Next, I will load this NSWindow to the right of the text input cursor, so that it follows the input cursor instead of the mouse cursor. (Bottom left corner of the picture)
Can I get the coordinates of the input cursor? It is best to be relative to the coordinates of the entire screen.
Thank you for your time!