We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 318 - False mouse position in 1024x768 windowed
Summary: False mouse position in 1024x768 windowed
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: 1.2.9
Hardware: x86 Windows (XP)
: P2 major
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-02 16:42 UTC by Vincent Vansuyt
Modified: 2006-11-12 21:41 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Vansuyt 2006-09-02 16:42:22 UTC
Hello,

Sorry for my english, I'm french. I hope you will understand what I mean...

I use SDL 1.2.9 with OpenGL and a Windows 2000 pro PC.

I test the mouse position with the followings intructions :
SDL_Event event;
SDL_PollEvent(&event)
int x = event.motion.x;
int y = event.motion.y;

In 800x600 resolution, full srceen :
the top-left mouse position is in 0,0 -> OK
the bottom-right mouse position is 799,599 -> OK

In 800x600 resolution, windowed :
the top-left mouse position is in 0,0 -> OK
the bottom-right mouse position is 799,599 -> OK

In 1024x768 resolution, full screen :
the top-left mouse position is in 0,0 -> OK
the bottom-right mouse position is 1023,767 -> OK

In 1024x768 resolution, windowed :
the top-left mouse position is in 0,0 -> OK
the bottom-right mouse position is 1023,754 ->>>> NOK !!! It must be 767 in y !!

In 1280x960 resolution, full screen :
the top-left mouse position is in 0,0 -> OK
the bottom-right mouse position is 1279,959 -> OK

In 1280x960 resolution, windowed :
the top-left mouse position is in 0,0 -> OK
the bottom-right mouse position is 1279,959 -> OK

The problem come probably from the window size and the header bar size...
If the 1024x768 windowed works like the 800x600 or the 1280x960 windowed, it will be perfect...

Thanks.
Comment 1 Sam Lantinga 2006-09-23 21:02:49 UTC
I think this is probably fixed in SDL 1.2.11, can you retest?
Comment 2 Vincent Vansuyt 2006-09-24 04:19:25 UTC
You THINK this is PROBALY... ?!!

I know now why it is so much bug in SDL : You don't do any test after coding !!!

Personnaly I have no time to install the 1.2.11 version. And I can't, the devPack 1.2.11 doesn't work with devCpp... 

Sorry.
Comment 3 Sam Lantinga 2006-09-24 12:21:32 UTC
I can't reproduce it in 1.2.11, and I fixed several bugs with mouse position on Windows for 1.2.11, specifically relating to the window size and accounting for menu bars.  I don't maintain the devcpp packages, so if you don't have time to build it yourself you may be out of luck.
Comment 4 Ryan C. Gordon 2006-11-12 21:41:29 UTC
Without further comment, I'm flagging this bug as fixed. If you are unsatisfied with SDL, you may return it for a full refund.

--ryan.