From 4e99ac4f2070745642c293a6424f5e661ead24b9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Mon, 4 Jun 2012 16:12:38 -0400 Subject: [PATCH] compositor: Set pointer->current before calling focus handler The grab interface handlers all expect pointer->current to identify the surface under the pointer regardless of grabs etc. Thus, we need to set it before calling the focus handler. --- src/compositor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compositor.c b/src/compositor.c index 0168dc9..b3a9d56 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -631,10 +631,10 @@ weston_device_repick(struct wl_seat *seat) if (&surface->surface != seat->pointer->current) { interface = seat->pointer->grab->interface; + seat->pointer->current = &surface->surface; interface->focus(seat->pointer->grab, &surface->surface, seat->pointer->current_x, seat->pointer->current_y); - seat->pointer->current = &surface->surface; } focus = (struct weston_surface *) seat->pointer->grab->focus; -- 2.7.4