Bug 6650 - X server does not ungrab mouse pointer when grabbing client exits
Summary: X server does not ungrab mouse pointer when grabbing client exits
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: 6.9.0
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-19 14:33 UTC by Jamey Sharp
Modified: 2011-09-27 10:02 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Log file from the failing X session (39.33 KB, text/plain)
2006-04-19 14:35 UTC, Jamey Sharp
no flags Details

Description Jamey Sharp 2006-04-19 14:33:09 UTC
Shortly after starting StepMania 3.9, it crashed, leaving the screen resolution
wrong (easily fixed with xrandr) and the mouse pointer frozen in place. I
haven't been able to fix the pointer by re-plugging my USB mouse or by switching
to a VT and back.

I speculate that StepMania had an active pointer grab and the X server failed to
ungrab at connection close, which would be a bug with respect to the protocol
specification. But with the X server in this broken state, the X Test Suite
nonetheless reports PASS for almost all XGrabPointer and all XUngrabPointer
tests. (I suspect the few FAILs I see are because I'm running the tests on a
display with a window manager.) I assume the tests should all fail if an active
grab is already in place, so I suppose my hypothesis is wrong.

I don't know yet if the bug is reproducible; I plan to check after restarting my
X server. I've tried no configurations other than the one described above, so I
can't tell you what happens under any other conditions.
Comment 1 Jamey Sharp 2006-04-19 14:35:57 UTC
Created attachment 5371 [details]
Log file from the failing X session
Comment 2 Jamey Sharp 2006-04-19 14:58:06 UTC
Yes, the bug reoccurs from a failsafe xterm session. The resulting Xorg.0.log
file is identical.

The X Test Suite results appear to be the same on a working X server, for
whatever that's worth.
Comment 3 Michel Dänzer 2006-04-19 16:09:49 UTC
Yes, this is a known long-standing issue; running another game that grabs the
pointer and exiting it cleanly usually restores normal operation.

Maybe the server only fails to ungrab under specific circumstances not covered
by the test suite?
Comment 4 Daniel Stone 2007-02-27 01:31:37 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 5 Andrew Zabolotny 2007-05-07 12:41:48 UTC
I have the same problem with my application. It's a PITA to debug it since it crashes pretty often ;-) and I have to restart X after every crash.

I'll try to write a simple XGrabPointer/XUngrabPointer app like suggested above though. Thanks for the tip.
Comment 6 Samuel Bronson 2007-08-20 13:33:39 UTC
QEMU has this problem too. I wonder if this is at all related to #10048?
Comment 7 Michel Dänzer 2007-08-21 01:12:16 UTC
(In reply to comment #6)
> QEMU has this problem too. I wonder if this is at all related to #10048?

Quite possibly, can you try the patch from bug 10048 (note how bugzilla automatically generates a link for this syntax :)?
Comment 8 Michal Suchanek 2007-11-20 13:18:11 UTC
You can also try to configure the ungrab key combos in ServerFlags section in the X config. 
Comment 9 Daniel Stone 2011-09-27 10:02:55 UTC
Actually, we're pretty careful about how we handle actual grabs, and make sure to shut them down on client exit.  There was a bug for quite a while where we didn't shut down DGA grabs -- used heavily by games -- properly on client shutdown, which has since been fixed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.