After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 748705 - mutter generates a spurious motion event for every button event
mutter generates a spurious motion event for every button event
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
unspecified
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2015-04-30 13:27 UTC by Olivier Fourdan
Modified: 2015-06-12 15:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed fix (1.03 KB, patch)
2015-04-30 13:31 UTC, Olivier Fourdan
none Details | Review
Updated patch (1.32 KB, patch)
2015-05-04 08:04 UTC, Olivier Fourdan
committed Details | Review

Description Olivier Fourdan 2015-04-30 13:27:29 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.
Comment 1 Olivier Fourdan 2015-04-30 13:31:41 UTC
Created attachment 302652 [details] [review]
Proposed fix
Comment 2 Rui Matos 2015-04-30 16:01:16 UTC
(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.
Comment 3 Olivier Fourdan 2015-05-04 08:04:54 UTC
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.
Comment 4 Rui Matos 2015-05-04 11:04:24 UTC
Review of attachment 302836 [details] [review]:

lgtm
Comment 5 Olivier Fourdan 2015-06-12 14:48:47 UTC
(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?
Comment 6 Jasper St. Pierre (not reading bugmail) 2015-06-12 15:17:21 UTC
i pushed it, don't worry
Comment 7 Olivier Fourdan 2015-06-12 15:51:26 UTC
(In reply to Jasper St. Pierre from comment #6)
> i pushed it, don't worry

Thanks a bunch!