GNOME Bugzilla – Bug 748705
mutter generates a spurious motion event for every button event
Last modified: 2015-06-12 15:51:26 UTC
The button event handler in src/wayland/meta-wayland-pointer.c will generate a motion event for every button event. That is causing spurious motion notify which can confuse some X apps under Xwayland (e.g. rxvt "jumpy mouse detection" code) See downstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=1212035 Removing the call to notify_motion() in handle_button_event() solves the issue. I am not sure why this was added in the first place, but I did not see any ill effect neither in Wayland not in X apps after removing that notify_motion() call. Will attach a patch for further comment/discussion.
Created attachment 302652 [details] [review] Proposed fix
(In reply to Olivier Fourdan from comment #0) > I am not sure why this was added in the first place, but I did not see any > ill effect neither in Wayland not in X apps after removing that > notify_motion() call. Right, I think it's safe to get rid of this call in handle_button_event() and also in handle_scroll_event(). These calls have been there ever since the first wayland support patches landed and for all I know they might just have been a copy/paste thinko in that initial code.
Created attachment 302836 [details] [review] Updated patch (In reply to Rui Matos from comment #2) > (In reply to Olivier Fourdan from comment #0) > > I am not sure why this was added in the first place, but I did not see any > > ill effect neither in Wayland not in X apps after removing that > > notify_motion() call. > > Right, I think it's safe to get rid of this call in handle_button_event() > and also in handle_scroll_event(). These calls have been there ever since > the first wayland support patches landed and for all I know they might just > have been a copy/paste thinko in that initial code. Oh right, I didn't spot the one in handle_scroll_event(), uploading an updated patch to remove that one as well.
Review of attachment 302836 [details] [review]: lgtm
(In reply to Rui Matos from comment #4) > Review of attachment 302836 [details] [review] [review]: > > lgtm Hi Rui, should I (try to) push it or could you push it for me? Or do we need more reviews?
i pushed it, don't worry
(In reply to Jasper St. Pierre from comment #6) > i pushed it, don't worry Thanks a bunch!