Accepting Mouse Moved Events
When a game is in window mode, all you have to do is [window setAcceptsMouseMovedEvents:YES]. How do you achieve this when in full screen mode using CGDirectDisplay? I'm guessing that the way would be to get the shield window's ID and set that window to accept the mouse moved events, no? If this is they way, how do you use a window's ID to send messages to the window? Otherwise, how do you accept mouse moved events?
Omni does it by creating a window even in full-screen mode. See their GDC "Porting games to Mac OS X" PDF for details.
You can also do it with Carbon Events, or by getting your mouse movements from the HID manager (on Jaguar).
You can also do it with Carbon Events, or by getting your mouse movements from the HID manager (on Jaguar).
Oh, okay. I was using their code as a guide and did not quite catch that.
Hey wait a minute! I was reading the code over again and found this:
Does this mean that the CoreGraphics shield window is automatically set to accept mouse movement events or are they referring to when you use some other method of going full screen with OpenGL?
Code:
// Enable mouse moved events. We only need to do this if
we actually have an NSWindow. Fullscreen GL applications do not
need their own NSWindow. The system will create a window them
itself and will turn on mouse movement events
[window setAcceptsMouseMovedEvents: YES];Does this mean that the CoreGraphics shield window is automatically set to accept mouse movement events or are they referring to when you use some other method of going full screen with OpenGL?
Hey, sounds like it! Try it and see 
Sorry, I don't remember seeing that before. Have they updated it recently?

Sorry, I don't remember seeing that before. Have they updated it recently?
I don't think so. It seems like the same old 2001 code.
Yay! It does work!
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Full screen mouse events | Mister T | 17 | 7,559 |
Jan 4, 2010 02:55 PM Last Post: MacMan |
|
| Die-hard vertex-sorting function not accepting input values! | mikey | 6 | 3,271 |
Oct 31, 2009 03:36 AM Last Post: mikey |
|
| Mouse Events in NSView | Chandhu | 1 | 3,558 |
Feb 28, 2008 02:08 AM Last Post: kuon_ |
|
| Mouse events for an openGL window | majestik666 | 5 | 6,836 |
Jul 5, 2005 06:15 PM Last Post: majestik666 |
|
| windows getting resized/moved after switching resolutions | aarku | 5 | 4,361 |
Nov 30, 2003 03:56 AM Last Post: aarku |
|

