wayland: do not generate motion events

Mutter generates a motion event for every button and scroll events,
which confuses Xwayland apps that rely on XMotionEvents for various
purposes, e.g. it fools rxvt jumpy mouse detection code.

Remove the call to notify_motion() from the button and scroll event
handlers to avoid these spurious motion events.

https://bugzilla.gnome.org/show_bug.cgi?id=748705
This commit is contained in:
Olivier Fourdan 2015-04-30 15:28:16 +02:00 committed by Jasper St. Pierre
parent 9747277b7e
commit d593a61b39

View File

@ -339,8 +339,6 @@ handle_button_event (MetaWaylandPointer *pointer,
{
gboolean implicit_grab;
notify_motion (pointer, event);
implicit_grab = (event->type == CLUTTER_BUTTON_PRESS) && (pointer->button_count == 1);
if (implicit_grab)
{
@ -363,8 +361,6 @@ handle_scroll_event (MetaWaylandPointer *pointer,
struct wl_list *l;
wl_fixed_t x_value = 0, y_value = 0;
notify_motion (pointer, event);
if (clutter_event_is_pointer_emulated (event))
return;