[SDL] Problems with coordinates in mouse event message

Etienne Vouga ev at rice.edu
Wed Nov 9 15:07:11 PST 2005


I'm using the SDL 1.2.9 messages SDL_MOUSEMOTION/SDL_MOUSEBUTTONDOWN to track
the mouse position in my application, and for the most part this works fine.
However, occasionally on both Windows XP and the Mac, the application
initializes with the mouse coordinates not corresponding to the rendering
coordinates; creating the initial window in Windows XP with the bottom of the
window trailing off the bottom of the screen consistently reproduces this error.
When this problem is in effect, the graphics of my application seems "shrunk"
vertically (mind you, my program does not invoke any SDL or OpenGL that does
this intentionally); on Windows, moving the window around for long enough causes
the "shrinking" to go away. This restoring of correct behavior happens during a
SDL_VIDEOEXPOSE message, but my application does nothing in response to that
message.
I'm somewhat concerned about my application loading with the coordinate system
not working correctly a significant portion of the time; has anyone else
encountered this problem, or have any ideas on how to rectify it?
Thanks.





More information about the SDL mailing list