SDL c++ - While dragging a window I receave mousemotion events with wrong x,y values
I'm using sdl to port a game from win32 to OSX.
when I dragg the game window, I keep receiving mousemotion events with wrong x,y values.
Any one have this beavior? Can I detect window dragging to ignore mousemotion events?
thanks in advanced
LC
when I dragg the game window, I keep receiving mousemotion events with wrong x,y values.
Any one have this beavior? Can I detect window dragging to ignore mousemotion events?
thanks in advanced
LC
Quote:I'm using sdl to port a game from win32 to OSX.Don't have an answer for you, but I've observed this behavior as well.
when I dragg the game window, I keep receiving mousemotion events with wrong x,y values.
Fixing this is on the 'todo' list for the Mac version of my game though. If I manage to solve the problem (and if the question hasn't already been answered by then), I'll post back with whatever I find out.
I don't know if this will solve your problem, but you can determine at any time whether your app has mouse, input, and/or app focus using SDL_GetAppState() or by listening for 'active' events. When the window is being dragged your app will not have mouse focus, in which case you can just ignore the errant mouse motion events that are generated as the window is moved.
_jyk_ Wrote:I don't know if this will solve your problem, but you can determine at any time whether your app has mouse, input, and/or app focus using SDL_GetAppState() or by listening for 'active' events. When the window is being dragged your app will not have mouse focus, in which case you can just ignore the errant mouse motion events that are generated as the window is moved.It works for me
... thanks
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Carbon mouse events blocked by window events | krex505 | 3 | 2,678 |
Sep 22, 2006 12:04 AM Last Post: krex505 |
|

