From 2f3a5f200143d4641e5c5021557b2cb1ba8d813f Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Wed, 14 Aug 2013 16:29:09 +0200 Subject: [PATCH] MetaWaylandSeat: correct logic to set the current / focused surface The current surface refers to the surface right below the pointer (according to the pick performed by clutter), while the focus surface is the one receiving events. They can be out of sync in case of grabs, in which case we should keep trying to focus the current surface. https://bugzilla.gnome.org/show_bug.cgi?id=706077 --- src/wayland/meta-wayland-seat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wayland/meta-wayland-seat.c b/src/wayland/meta-wayland-seat.c index 9fb285abf..0d2b729e5 100644 --- a/src/wayland/meta-wayland-seat.c +++ b/src/wayland/meta-wayland-seat.c @@ -507,14 +507,14 @@ meta_wayland_seat_repick (MetaWaylandSeat *seat, surface = meta_shaped_texture_get_wayland_surface (shaped_texture); } - if (surface != pointer->current) + pointer->current = surface; + if (surface != pointer->focus) { const MetaWaylandPointerGrabInterface *interface = pointer->grab->interface; interface->focus (pointer->grab, surface, pointer->current_x, pointer->current_y); - pointer->current = surface; } if (pointer->grab->focus)