[mutter/wayland] MetaWaylandSeat: correct logic to set the current / focused surface
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] MetaWaylandSeat: correct logic to set the current / focused surface
- Date: Thu, 15 Aug 2013 15:44:08 +0000 (UTC)
commit 2f3a5f200143d4641e5c5021557b2cb1ba8d813f
Author: Giovanni Campagna <gcampagn redhat com>
Date: Wed Aug 14 16:29:09 2013 +0200
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 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/wayland/meta-wayland-seat.c b/src/wayland/meta-wayland-seat.c
index 9fb285a..0d2b729 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]