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
This commit is contained in:
Giovanni Campagna 2013-08-14 16:29:09 +02:00
parent 0e098249b1
commit 2f3a5f2001

View File

@ -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)