Bug 2945 - Mouse locks when using console in windowed mode (SDL)
Status: RESOLVED WONTFIX
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Video
Version: 1.33 SVN
Hardware: PC Linux
: P2 normal
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2006-12-07 05:31 EST by Ben Noordhuis
Modified: 2007-05-21 11:27:07 EDT
2 users (show)

See Also:


Attachments
And here is the patch. (791 bytes, patch)
2006-12-07 05:31 EST, Ben Noordhuis

Description Ben Noordhuis 2006-12-07 05:31:01 EST
To reproduce:

- compile IOQ3 against SDL
- start it in windowed mode
- open the console
- move the mouse outside the window
- close the console

The mouse is now locked to the horizontal plane and cannot be moved more than approximately 45 degrees in both directions. The cause is likely a bug in SDL or xlib. This patch works around it by warping the mouse to the center of the window before grabbing it again.
Comment 1 Ben Noordhuis 2006-12-07 05:31:46 EST
Created attachment 1186 [details]
And here is the patch.
Comment 2 Ryan C. Gordon 2006-12-07 15:29:53 EST
(In reply to comment #0)
> The mouse is now locked to the horizontal plane and cannot be moved more than
> approximately 45 degrees in both directions. The cause is likely a bug in SDL
> or xlib. This patch works around it by warping the mouse to the center of the
> window before grabbing it again.

This was an SDL bug, but it was recently fixed.
   http://bugzilla.libsdl.org/show_bug.cgi?id=299

The fix will be in SDL 1.2.12, but it isn't in any official release packages yet (SDL 1.2.9 and earlier aren't affected, nor are non-X11 video targets).

Not sure if that changes anything, just wanted to document where this really went wrong.

--ryan.

Comment 3 Thilo Schulz 2006-12-15 08:35:19 EST
I always suspected this was an SDL bug or at least something in the X stuff, because I saw some VNC client using SDL exhibiting the same behaviour.
In my opinion, ioquake3 should not work around this as the bug clearly lies somewhere else and will go away on its own eventually.
Comment 4 Tim Angus 2006-12-19 17:55:55 EST
I agree.
Comment 5 Ryan C. Gordon 2007-05-21 11:27:07 EDT
Setting a QA contact on all ioquake3 bugs, even resolved ones. Sorry if you get a flood of email from this, it should only happen once. Apologies for the incovenience.

--ryan.