In my application I am capturing window using CGWindowListCreateImage
let windowID = 12345;
let windowImage = CGWindowListCreateImage(.null, .optionIncludingWindow, CGWindowID(windowID), [.bestResolution, .boundsIgnoreFraming])
This is working nicely.
How can I capture window with cursor using this approach?