wayland: Only repick pointer on crossing events

These are the only situations where it makes sense to determine a new
focus surface.

Suggested-by: Jonas Dreßler <verdre@v0yd.nl>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1654>
This commit is contained in:
Carlos Garnacho 2020-12-23 12:33:00 +01:00
parent ce6b91bb64
commit ad3f2b0b86

View File

@ -611,6 +611,8 @@ void
meta_wayland_pointer_update (MetaWaylandPointer *pointer, meta_wayland_pointer_update (MetaWaylandPointer *pointer,
const ClutterEvent *event) const ClutterEvent *event)
{ {
if (event->type == CLUTTER_ENTER ||
event->type == CLUTTER_LEAVE)
repick_for_event (pointer, event); repick_for_event (pointer, event);
if (event->type == CLUTTER_MOTION || if (event->type == CLUTTER_MOTION ||