Manual event handling
Manual event handling
- Subject: Manual event handling
- From: Darrell Walisser <email@hidden>
- Date: Wed, 30 May 2001 09:53:59 -0500 (EST)
I am porting a framework for games to Cocoa, so I require fine
control and manual detection of events. So far, I am using:
[ NSApp nextEventMatchingMask: ... ];
which works like a charm. My problem is that when an event occurs, I need
to know exactly where it was in the window, in window coordinates, not
screen coordinates:
NSWindow *window;
...
NSEvent *event;
...
NSPoint p = [ event locationInWindow ];
This code works until I drag the window to a new location. What happens
next is the location reported now reflects where the window *was* instead
of where the window *is*.
I believe there must be a message sent to the window to tell it that it
was moved, and I would like to send this event to the window. Does anyone
know what event this might be?
Thanks,
Darrell