Fwd: [PATCH 3/3] evdev: Don't post REL_MISC events as axis motion. (#24737)
Bartosz Brachaczek
b.brachaczek at gmail.com
Mon Aug 16 03:50:16 PDT 2010
2010/8/16 Peter Hutterer <peter.hutterer at who-t.net>:
> On Fri, Aug 13, 2010 at 02:12:41PM +0200, Bartosz Brachaczek wrote:
>> Actually this REL_MISC event doesn't affect x/y motion, at least for
>> me, as long as the bug fixed by patches 1, 2 is fixed (though Bartek
>> Iwaniec had problems with it, see
>> https://bugs.freedesktop.org/show_bug.cgi?id=24737#c19). The problem
>> caused by REL_MISC is described in this comment:
>> https://bugs.freedesktop.org/show_bug.cgi?id=24737#c29.
>>
>> Anyway, you can see that REL_MISC events sent by this device are
>> obviously wrong and confusing:
>>
>> # ./evtest /dev/input/event6
> [..]
>> Event: time 1281700515.957497, type 2 (Relative), code 9 (Misc), value 8
>> Event: time 1281700515.957498, -------------- Report Sync ------------
>> Event: time 1281700515.965503, type 2 (Relative), code 9 (Misc), value 8
>> Event: time 1281700515.965505, -------------- Report Sync ------------
>> Event: time 1281700515.973505, type 2 (Relative), code 0 (X), value 2
>> Event: time 1281700515.973509, type 2 (Relative), code 9 (Misc), value 8
>> Event: time 1281700515.973510, -------------- Report Sync ------------
>> Event: time 1281700515.981509, type 2 (Relative), code 9 (Misc), value 8
>> Event: time 1281700515.981512, -------------- Report Sync ------------
>> Event: time 1281700515.997508, type 2 (Relative), code 1 (Y), value -2
>> Event: time 1281700515.997511, type 2 (Relative), code 9 (Misc), value 8
>> Event: time 1281700515.997512, -------------- Report Sync ------------
>> Event: time 1281700516.005506, type 2 (Relative), code 0 (X), value 1
>> Event: time 1281700516.005509, type 2 (Relative), code 9 (Misc), value 8
>> Event: time 1281700516.005510, -------------- Report Sync ------------
>> Event: time 1281700516.013504, type 2 (Relative), code 0 (X), value 2
>> Event: time 1281700516.013508, type 2 (Relative), code 9 (Misc), value 8
>> Event: time 1281700516.013509, -------------- Report Sync ------------
>> Event: time 1281700516.021506, type 2 (Relative), code 9 (Misc), value 8
>> Event: time 1281700516.021510, -------------- Report Sync ------------
>> Event: time 1281700516.029508, type 2 (Relative), code 9 (Misc), value 8
>> Event: time 1281700516.029511, -------------- Report Sync ------------
>>
>>
>> Maybe kernel should have a quirk for this device?
>
> yeah, possibly. but with your patches applied (except for the REL_MISC one)
> this only results in spare motion events that don't actually do anything
> (the GIMP may get confused though). I've tested this with a software
> emulation device and everything seemed to work fine.
>
> I've pushed the other two patches, thanks for your efforts.
>
> Cheers,
> Peter
>
The problem is that the X server still posts MotionNotify events
because of these REL_MISC events, which according to libX11 specs
(section 10.5.2) is incorrect because MotionNotify indicates that the
pointer moved, which isn't the case here. So either evdev should not
post REL_MISC as a motion event or X server should check if the
pointer actually moved before posting MotionNotify event.
Cheers,
Bartosz
More information about the xorg-devel
mailing list