Summary: | server 1.4.1: Input Events Duplicated Across Different Windows | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | David Nusinow <dnusinow> | ||||||||
Component: | Server/General | Assignee: | Xorg Project Team <xorg-team> | ||||||||
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> | ||||||||
Severity: | normal | ||||||||||
Priority: | medium | CC: | ademar, lukasz.krotowski, ossi | ||||||||
Version: | git | ||||||||||
Hardware: | Other | ||||||||||
OS: | All | ||||||||||
Whiteboard: | |||||||||||
i915 platform: | i915 features: | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 12560 | ||||||||||
Attachments: |
|
Description
David Nusinow
2007-11-06 20:13:29 UTC
Created attachment 12376 [details]
xorg.conf
Created attachment 12377 [details]
Logfile
It seems to affect just repeated key events here - they get delivered to the focused window and the one below the pointer (so repeat speed appears to double when they coincide). Daniel Stone asked me to try http://people.freedesktop.org/~daniels/no-core-xkb-actions.diff but it makes the server abort with FatalError("Impossible keyboard event") on repeated key events. (In reply to comment #3) > It seems to affect just repeated key events here - they get delivered to the > focused window and the one below the pointer (so repeat speed appears to double > when they coincide). Daniel Stone asked me to try > > http://people.freedesktop.org/~daniels/no-core-xkb-actions.diff > > but it makes the server abort with FatalError("Impossible keyboard event") on > repeated key events. Yes, I get the exact same results. The bug only happens with repeated key events, and the patch causes the same crash for me. *** Bug 13210 has been marked as a duplicate of this bug. *** Created attachment 12490 [details] [review] send correct events on autorepeat The reason for this is a bit complicated, here's an attempt of an explanation. XI devices have separate focus settings to core devices. A WM that sets the focus using XSetInputFocus only sets it for the core keyboard, not for all the XI devices. In the autorepeat handler, we'd send down a core KeyPress/KeyRelease event for the device registered. This would be alternating the core keyboard and the actual device that generated the event. The former is all nice and goes to the right window, the latter however is by default set to PointerRootWin. So when the event is processed, it goes to the sprite window, causing the repeats to occur in a second window. The solution is fairly simple: the XI device shouldn't actually generate the core event in the first place. So in the repeat handler, we check for the type of the device and create KeyPress or DeviceKeyPress accordingly. That means that XI events are still delivered to the sprite window but that's how the server has always behaved (and nobody cares about XI events anyway). (In reply to comment #6) > Created an attachment (id=12490) [details] > send correct events on autorepeat Patch fixes the bug for me, thx. *** Bug 13223 has been marked as a duplicate of this bug. *** I was hoping to avoid the core keyboard generating repeat events at all, but this is a good minimal fix for 1.4.x. Applied with some minor cleanups -- thanks. *** Bug 13320 has been marked as a duplicate of this bug. *** |
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.