Bug 16179

Summary: Xephyr emits MotionNotify before all ButtonPress and ButtonRelease events
Product: xorg Reporter: Tomas Janousek <tomi>
Component: Server/DDX/XephyrAssignee: Matthew Allum <mallum>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
a simple proof-of-concept patch
none
improved patch
none
0001-kdrive-don-t-post-motion-event-if-there-was-no-moti.patch
none
0001-kdrive-don-t-post-motion-event-if-there-was-no-moti.patch none

Description Tomas Janousek 2008-05-31 14:58:14 UTC
Created attachment 16847 [details] [review]
a simple proof-of-concept patch

Xephyr emits MotionNotify before all ButtonPress and ButtonRelease events, when the mouse hasn't actually moved. This makes some apps (like fluxbox) think that the user has dragged the thing. I'm attaching a simple patch, no idea if it doesn't break something though.
Comment 1 Peter Hutterer 2008-06-01 05:14:01 UTC
On Sat, May 31, 2008 at 02:58:42PM -0700, bugzilla-daemon@freedesktop.org wrote:
> Xephyr emits MotionNotify before all ButtonPress and ButtonRelease events, when
> the mouse hasn't actually moved. This makes some apps (like fluxbox) think that
> the user has dragged the thing. I'm attaching a simple patch, no idea if it
> doesn't break something though.

The patch isn't quite correct since it does not accommodate for absolute
devices (in which case 0 may a valid coordinate). Care to fix it up?
Comment 2 Tomas Janousek 2008-06-01 14:48:47 UTC
Created attachment 16857 [details] [review]
improved patch

Well, I can try. Dunno how to test, but this might be it.
Comment 3 Peter Hutterer 2008-06-03 00:20:06 UTC
Created attachment 16887 [details] [review]
0001-kdrive-don-t-post-motion-event-if-there-was-no-moti.patch

cherry-picked from master && backported.
Please give this one a try, I don't have a 1.4 setup here. Basically the same as yours, but I cleaned it up a bit.
Comment 4 Tomas Janousek 2008-06-03 08:10:18 UTC
I was on server-1.5-branch, and it works. I did not test the absolute execution path though, since I don't know how, but the changes you did to the patch are definitely correct.
Comment 5 Daniel Stone 2008-06-10 14:36:22 UTC
'dixflags = POINTER_RELATIVE & POINTER_ACCELERATE;'

erm ...
Comment 6 Peter Hutterer 2008-06-11 01:06:23 UTC
Created attachment 17051 [details] [review]
0001-kdrive-don-t-post-motion-event-if-there-was-no-moti.patch

ah yeah. & ain't the same as "and", isn't it... sorry about that. updated.
Comment 7 Daniel Stone 2008-06-11 01:37:04 UTC
On Wed, Jun 11, 2008 at 01:06:38AM -0700, bugzilla-daemon@freedesktop.org wrote:
> Created an attachment (id=17051)
>  --> (http://bugs.freedesktop.org/attachment.cgi?id=17051)
> 0001-kdrive-don-t-post-motion-event-if-there-was-no-moti.patch
> 
> ah yeah. & ain't the same as "and", isn't it... sorry about that. updated.

You're hardly the first. :)
Comment 8 Peter Hutterer 2008-07-16 05:16:46 UTC
Pushed to master as 26e7e69ab893d1f2b35213250ada40ec90944f62.
Pushed to server-1.5-branch as ac1db454497ff1839aa7f7ee0649ede112824ed9.

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.