You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: 1.2.14 Reported for operating system, platform: Linux, All
Comments on the original bug report:
On 2010-08-28 07:02:01 +0000, Andrew Church wrote:
If, after calling SDL_SetVideoMode() to resize the window, SDL receives a ConfigureNotify event for the old size, SDL_PrivateResize() will be called with the old size, generating an SDL_VIDEORESIZE event and (significantly) calling SDL_SetMouseRange() on the given size. When the ConfigureNotify for the resized window comes in, it will be dropped because it's the same as the current window size, meaning that SDL_SetMouseRange() still has the old size; if that is smaller than the actual window size, then SDL_GetMouseState() will only return coordinates within that smaller size.
For example, when resizing a window from 800x600 to 1024x768, if a ConfigureNotify for 800x600 comes in after SDL_SetVideoMode(1024,768,...), then SDL_GetMouseState() will only return mouse coordinates in the range (0,0)-(799,599).
I haven't succeeded in reproducing the issue in a simple test program; it may be a race condition that only manifests under load or with a particular code sequence.
The fix is probably to ignore all ConfigureNotify events after a window resize until one is received for the new window size.
On 2010-08-28 07:04:32 +0000, Andrew Church wrote:
Created attachment 537
Possible fix for bug
On 2011-08-23 13:48:56 +0000, Ryan C. Gordon wrote:
A modified version of this patch is now hg changeset ad4ed9f0336f.
Thanks!
--ryan.
The text was updated successfully, but these errors were encountered:
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: 1.2.14
Reported for operating system, platform: Linux, All
Comments on the original bug report:
On 2010-08-28 07:02:01 +0000, Andrew Church wrote:
On 2010-08-28 07:04:32 +0000, Andrew Church wrote:
On 2011-08-23 13:48:56 +0000, Ryan C. Gordon wrote:
The text was updated successfully, but these errors were encountered: