CGDisplayHideCursor, CGDisplayShowCursor and CGWindowListCreateImage problem when screen is zoomed
I am developing a Desktop application in which I am reading the screen buffer data and create image out of it. I use the call glReadPixels to read the screen data.
If I do not want to show the cursor in the image created from screen buffer, I hide the cursor using the call CGDisplayHideCursor before creating the image from screen buffer.
If I want to show the cursor in the image created from screen buffer, I enable use the开发者_StackOverflow中文版 call CGDisplayShowCursor before creating the image from screen buffer.
This works fine in normal scenario. But, if I try this when the screen is zoomed:
- Cursor is shown in the image created from the screen even if I hide it.
- Two cursors are shown in the image created from the screen even if I show the cursor.
What is the problem here?
I could solve it using CGCursorIsDrawnInFramebuffer which tells if the cursor is included in the buffer or not.
精彩评论