[SDL] Problems with coordinates in mouse event message
koshmaar at poczta.onet.pl
Thu Nov 10 06:57:35 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
> 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?
Hmmm, I know only about one case where mouse coordinates go crazy - when
your application is in fullscreen, they differ somehow from when in
windowed mode (I had such problem some time ago in 1.2.8 with OGL). But
I've never heard about such problems caused by window position - that's
pretty strange. Could you try to write smallest possible example which
reproduces that bug and show it here?
More information about the SDL