From ad3f2b0b8639600bbb233b598e6731f079a5325a Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 23 Dec 2020 12:33:00 +0100 Subject: [PATCH] wayland: Only repick pointer on crossing events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These are the only situations where it makes sense to determine a new focus surface. Suggested-by: Jonas Dreßler Part-of: --- src/wayland/meta-wayland-pointer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index c2b8741d4..1d6bb759c 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -611,7 +611,9 @@ void meta_wayland_pointer_update (MetaWaylandPointer *pointer, const ClutterEvent *event) { - repick_for_event (pointer, event); + if (event->type == CLUTTER_ENTER || + event->type == CLUTTER_LEAVE) + repick_for_event (pointer, event); if (event->type == CLUTTER_MOTION || event->type == CLUTTER_BUTTON_PRESS ||