开发者

Cocoa NSCursor hiding in "Lion like fullscreen"

Our (NSOpenGLView) application has two modes, one windowed and one "fullscreen" (the fullscreen behaves like the the new "fullscreen" feature of OS X Lion, so it takes the whole space, hides the dock and the menu becomes visible, if you drag your mouse to the top, and over the place where the dock is located).

In the windowed mode, a standard cursor is us开发者_StackOverflow社区ed, in the "fulscreen" mode, we don't render the system cursor, so on switch of the modes, we just toggle

[NSCursor hide]
[NSCursor unhide]

because in "fullscreen" we want to render our custom cursor in OpenGL.

Everything is ok, except the part, if the user moves over the the top, and the menu appears, or over the place where the dock is, and the dock appears, than the system automatically unhides the cursor which is on one place good, because the user can select from the top menu, but is also a problem as then the cursor is unhidden and both the opengl and the system cursor are rendered.

We tried various notification and delegate methods, to catch this situation and adjust the cursor visibility, but with no success.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜